#COMPILE EXE "s31_for_loop.exe"
' Sample: FOR/NEXT loop with STEP
FUNCTION PBMAIN() AS LONG
    DIM i AS LONG
    PRINT "Forward by 1:"
    FOR i = 1 TO 5
        PRINT i;
    NEXT i
    PRINT
    PRINT "Forward by 2:"
    FOR i = 1 TO 10 STEP 2
        PRINT i;
    NEXT i
    PRINT
    PRINT "Reverse:"
    FOR i = 5 TO 1 STEP -1
        PRINT i;
    NEXT i
    PRINT
    FUNCTION = 0
END FUNCTION
