File: putget.bas

package info (click to toggle)
bwbasic 2.20pl2-14
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,784 kB
  • sloc: ansic: 21,005; makefile: 80
file content (22 lines) | stat: -rw-r--r-- 422 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
21
22
rem PUTGET.BAS -- Test PUT and GET statements
open "r", 1, "test.dat", 48
field 1, 20 as r1$, 20 as r2$, 8 as r3$
for l = 1 to 2
line input "name: "; n$
line input "address: "; m$
line input "phone: "; p$
lset r1$ = n$
lset r2$ = m$
lset r3$ = p$
put #1, l
next l
close #1
open "r", 1, "test.dat", 48
field 1, 20 as r1$, 20 as r2$, 8 as r3$
for l = 1 to 2
get #1, l
print r1$, r2$, r3$
next l
close #1
kill "test.dat"
end