' Statistical functions: MIN, MAX, RND, RANDOMIZE, HYPOT, DIV, POPCOUNT
#COMPILE EXE
#DIM ALL

FUNCTION PBMAIN() AS LONG
    LOCAL i  AS LONG
    LOCAL count  AS LONG
    LOCAL ones  AS LONG
    PRINT "MIN(10, 20):"; MIN(10, 20)
    PRINT "MAX(10, 20):"; MAX(10, 20)
    PRINT "MIN(-5, 3):"; MIN(-5, 3)
    PRINT "HYPOT(3, 4):"; HYPOT(3, 4)

    RANDOMIZE 42
    PRINT "RND after RANDOMIZE 42:"; RND
    PRINT "RND again:"; RND

    PRINT "DIV(10, 3):"; DIV(10, 3)
    PRINT "POPCOUNT(7):"; POPCOUNT(7)
    PRINT "POPCOUNT(255):"; POPCOUNT(255)

    FUNCTION = 0
END FUNCTION
