File: opentest.bas

package info (click to toggle)
bwbasic 2.20pl2-11
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 1,236 kB
  • sloc: ansic: 21,001; makefile: 80
file content (12 lines) | stat: -rw-r--r-- 328 bytes parent folder | download | duplicates (10)
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