[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reading a file in Applesoft



I want to read a file character-by-character.

Eg.
10 D$=CHR$(4)
20 INPUT "Filename? ";F$
30 PRINT D$;"OPEN ";F$
40 PRINT D$;"READ ";F$
50 IF (end of file) THEN GOTO 9999
60 GET A$
etc.
100 GOTO 50
9999 PRINT D$;"CLOSE"

How can I tell when I've got to the end of the file so I can jump out and
close the file instead of getting an END OF DATA error?

Ralmin.