' DATA/RESTORE — Re-reading DATA statements with RESTORE
#COMPILE EXE
#DIM ALL

DATA 1, 2, 3, 4, 5
DATA 10, 20, 30

FUNCTION PBMAIN() AS LONG
    LOCAL a AS LONG
    LOCAL b AS LONG
    LOCAL c AS LONG

    PRINT "First pass:"
    READ a, b, c
    PRINT a; ", "; b; ", "; c

    RESTORE

    PRINT "Second pass (after RESTORE):"
    READ a, b, c
    PRINT a; ", "; b; ", "; c

    RESTORE

    PRINT "Third pass:"
    READ a
    READ b
    READ c
    PRINT a; ", "; b; ", "; c

    FUNCTION = 0
END FUNCTION
