Mark Wickens

ABS

Purpose

Returns the absolute value of the argument.

Format

ABS         (argument)
             └──┬───┘ 
       Numeric expression

*The parenthesis enclosing the argument can be omitted when the argument is a numeric value of variable.

Example

ABS(-1.5)

Parameters

argument: Numeric expression

Explanation

Returns the absolute value of the argument.

Sample Program

10  INPUT "INPUT NUMBERS"; N
20  A=ABS N
30  PRINT N; "ABS()="; A
40  END

Displays the absolute value of an input value.