File: opentest.bas

package info (click to toggle)
bwbasic 2.20pl2-8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,204 kB
  • ctags: 1,248
  • sloc: ansic: 21,002; makefile: 116
file content (12 lines) | stat: -rw-r--r-- 328 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
10 PRINT "OPENTEST.BAS -- Test OPEN, 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."
50 CLOSE #1
60 OPEN "test.out" FOR INPUT AS #1
70 LINE INPUT #1,A$
80 LINE INPUT #1,B$
90 PRINT "Read from file:"
100 PRINT ">";A$
110 PRINT ">";B$
120 CLOSE #1