Warning

You're browsing the old v2.x documentation. This version is no longer maintained. Click here to go the v3.x documentation.

ABS()

Since version 2.0

Syntax:

abs(<int expression>) | abs%(<float expression>)

The ABS() function returns the absolute value (value without the sign) of the given numeric expression.

Argument type and return type must match.

Examples:

print abs(-3)
rem -- will print 3

print abs%(-3.14)
rem -- will print 3.14