GLBasic User Manual

Main sections

ABS()

n# = ABS(m#)



Returns the absolute (positive) value of m#.

PRINT "ABS of -5 = " + ABS(-5),0,0  
PRINT "ABS of 7 = " + ABS(7),0,20
SHOWSCREEN
MOUSEWAIT



Output:
ABS of -5 = 5
ABS of 7 = 7

See also...