HP 3000 Manuals

ABS [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Reference Manual

ABS 

The ABS function returns the absolute value of a number.

Syntax 

ABS(n)

Parameters 

n                The number whose absolute value is to be returned.  n 
                 can be of any numeric type.

The return variable is the same type as n, except for INTEGER and SHORT
INTEGER types.  INTEGER variables return a REAL number, and SHORT INTEGER
variables return an INTEGER.

Examples 

     10  Abs = ABS(-10)     !Abs is 10
     20  Abs = ABS(10)      !Abs is 10



MPE/iX 5.0 Documentation