File: TEST.BAS

package info (click to toggle)
pcbasic 2.0.7-9
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 35,416 kB
  • sloc: python: 28,411; sh: 103; makefile: 10
file content (23 lines) | stat: -rw-r--r-- 491 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
10 REM PC-BASIC test 
20 REM LOCK and UNLOCK
25 REM model built with MS-DOS 5 & GW-BASIC 3.23 on VirtualBox
30 open "errors.txt" for output as 2
35 on error goto 10000
40 open "test.dat" for random as 1
50 lock#1, 1 to 3
60 put#1, 2
70 open "test.dat" for random as 3
80 get#3, 2
90 put#3, 4
95 put#3, 2
100 lock#3, 1 to 3
110 get#3, 2
120 put#3, 2
130 unlock#1, 1 to 2
140 unlock#1, 1 to 3
150 put#1, 2
160 put#3, 2
999 end
10000 print#2, err, erl
10010 resume next