Abs()

 

ABS()

Return the absolute value of a number.

Syntax

      ABS(<nNumber>) --> <nAbsNumber>

Arguments

<nNumber> Any number.

Returns

<nAbsNumber> The absolute numeric value.

Description

This function yields the absolute value of the numeric value or expression <nNumber>.

Examples

      PROCEDURE Main()
         LOCAL nNumber := 50
         LOCAL nNumber1 := 27
         CLS

         ? nNumber - nNumber1
         ? nNumber1 - nNumber
         ? ABS( nNumber - nNumber1 )
         ? ABS( nNumber1 - nNumber )
         ? ABS( -1 * 345 )

Compliance

Clipper

Platforms

All

Files

Library is rtl

3 responses to “Abs()

  1. Pingback: Harbour All Functions — A | Viva Clipper !

  2. Pingback: Harbour Math Functions | Viva Clipper !

  3. Pingback: Harbour RG Summary | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.