#COMPILE EXE "s06_random.exe"
' Sample: Random number generation
FUNCTION PBMAIN() AS LONG
    DIM i AS LONG, r AS DOUBLE
    RANDOMIZE TIMER
    PRINT "10 random numbers:"
    FOR i = 1 TO 10
        r = RND
        PRINT INT(r * 100) + 1;
        IF i < 10 THEN PRINT ", ";
    NEXT i
    PRINT
    FUNCTION = 0
END FUNCTION
