#COMPILE EXE "s22_multi_dim.exe"
' Sample: Multi-dimensional arrays
FUNCTION PBMAIN() AS LONG
    DIM matrix(3, 3) AS LONG, r AS LONG, c AS LONG
    PRINT "3x3 Multiplication table:"
    FOR r = 1 TO 3
        FOR c = 1 TO 3
            matrix(r, c) = r * c
            PRINT matrix(r, c);
        NEXT c
        PRINT
    NEXT r
    FUNCTION = 0
END FUNCTION
