Home > lang > abs 
 fr de es it nl pl pt pt_BR mk sq ca ar fa vi ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Refresh  Search  Administration  
Documentation
History
 
Abs
Syntax
Value = Abs ( Number AS Float )

Computes the absolute value of a number.

The absolute value of a number is its positive value, i. e. the absolute value of -7 is 7 and that of +7 is also 7.

Abs() lets you easily find the difference between two values:

value1 = 100
value2 = 200
PRINT "The difference is "; Abs(value1 - value2)
The difference is 100

Examples

PRINT Abs(-2.5)

2.5

PRINT Abs(0)

0

See also

Arithmetical Functions