Avisaro Online Documentation - Wiki
Impressum Kontakt Sitemap

ABS

Description

The ABS function computes the absolute value of a 32 bit signed integer value. That is simply the value itself with sign discarded.

Example

outmode -2
let a = 3
let b = -3
print abs(a)
print abs(b)
end

This prints two times a '3', because both numbers lose their signs.

Remarks

ABS is the BASIC equivalent of |x| in math notation.