The ABS()
function returns the absolute value of the passed numeric parameter.
DECLARE FUNCTION ABS AS BYTE (num AS BYTE) SHARED STATIC INLINE DECLARE FUNCTION ABS AS INT (num AS INT) OVERLOAD SHARED STATIC INLINE DECLARE FUNCTION ABS AS WORD (num AS WORD) OVERLOAD SHARED STATIC INLINE DECLARE FUNCTION ABS AS LONG (num AS LONG) OVERLOAD SHARED STATIC INLINE DECLARE FUNCTION ABS AS FLOAT (num AS FLOAT) OVERLOAD SHARED STATIC INLINE
PRINT ABS(-1) : REM will print 1 PRINT ABS(1) : REM will print 1 n = -5400 PRINT ABS(n) : REM will print 5400