|
- 10 PRINT "OPENTEST.BAS -- Test OPEN, EOF(), PRINT#, LINE INPUT#, and CLOSE"
- 20 OPEN "test.out" FOR OUTPUT AS # 1
- 30 PRINT #1,"This is line 1."
- 40 PRINT #1, "This is line 2."
- 45 PRINT #1, "ChipMaster WAS here!!"
- 50 CLOSE #1
- 60 PRINT "Read from file:"
- 70 OPEN "test.out" FOR INPUT AS #1
- 80 WHILE NOT EOF(1)
- 90 LINE INPUT #1,A$
- 100 PRINT "> "; A$
- 110 WEND
- 120 CLOSE #1
- 130 PRINT " --- END OF LINE ---"
|