' Integer and rounding: INT, FIX, ROUND, CEIL, FLOOR, ABS, SGN
#COMPILE EXE
#DIM ALL

FUNCTION PBMAIN() AS LONG
    LOCAL val1  AS DOUBLE
    LOCAL val2  AS DOUBLE
    val1 = 3.14159
    val2 = -2.71828

    PRINT "Value 1:"; val1
    PRINT "Value 2:"; val2
    PRINT "INT(3.14159):"; INT(val1)
    PRINT "INT(-2.718):"; INT(val2)
    PRINT "FIX(3.14159):"; FIX(val1)
    PRINT "FIX(-2.718):"; FIX(val2)
    PRINT "ROUND(3.14159, 2):"; ROUND(val1, 2)
    PRINT "CEIL(3.14159):"; CEIL(val1)
    PRINT "FLOOR(3.14159):"; FLOOR(val1)
    PRINT "ABS(-2.718):"; ABS(val2)
    PRINT "SGN(-2.718):"; SGN(val2)
    PRINT "SGN(3.14159):"; SGN(val1)

    FUNCTION = 0
END FUNCTION
