/usr/share/doc/bwbasic/examples/putget.bas is in bwbasic 2.20pl2-11.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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
|