File: writeinp.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 (20 lines) | stat: -rw-r--r-- 584 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
10 rem WRITEINP.BAS -- Test WRITE # and INPUT # Statements
20 print "WRITEINP.BAS -- Test WRITE # and INPUT # Statements"
30 s1$ = "String 1"
40 s2$ = "String 2"
50 s3$ = "String 3"
60 x1 = 1.1234567
70 x2 = 2.2345678
80 x3 = 3.3456789
90 open "o", #1, "data.tmp"
100 write #1, s1$, x1, s2$, x2, s3$, x3
110 close #1
120 print "This is what was written:"
130 write s1$, x1, s2$, x2, s3$, x3
140 open "i", #2, "data.tmp"
150 input #2, b1$, n1, b2$, n2, b3$, n3
160 close #2
170 print "This is what was read:"
180 write b1$, n1, b2$, n2, b3$, n3
190 print "End of WRITEINP.BAS"
200 end