#COMPILE EXE "s55_pointer_arith.exe"
' Sample: Pointer arithmetic with arrays
FUNCTION PBMAIN() AS LONG
    DIM arr(4) AS LONG, p AS LONG PTR, i AS LONG
    FOR i = 0 TO 4
        arr(i) = i * 10
    NEXT i
    p = VARPTR(arr(0))
    PRINT "Array via pointer:"
    FOR i = 0 TO 4
        PRINT "arr("; i; ") ="; @(p + i)
    NEXT i
    FUNCTION = 0
END FUNCTION
