ABS
 
Syntax

ABS ( number )
Description

The absolute value of a number is its unsigned magnitude. For example, ABS(-1) and ABS(1) both return 1. The required number argument can be any valid numeric expression. If number is an uninitialized variable, zero is returned.
Example


PRINT ABS ( -1 )
PRINT ABS ( 42 )
PRINT ABS ( N )

N = -69

PRINT ABS ( N )


The output would look like:
1
42
0
69


Differences from other BASICs

See also