Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
20
Task/File-input-output/BASIC/file-input-output-2.basic
Normal file
20
Task/File-input-output/BASIC/file-input-output-2.basic
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
100 I$ = "INPUT.TXT"
|
||||
110 O$ = "OUTPUT.TXT"
|
||||
120 D$ = CHR$(4)
|
||||
130 M$ = CHR$(13)
|
||||
140 PRINT D$"VERIFY"I$
|
||||
150 PRINT D$"OPEN"O$M$D$"CLOSE"O$M$D$"DELETE"O$
|
||||
160 PRINT D$"OPEN"O$M$D$"OPEN"I$;
|
||||
|
||||
170 PRINT M$D$"READ"I$
|
||||
180 ONERR GOTO 250
|
||||
190 GET C$
|
||||
200 POKE 216,0
|
||||
210 PRINT M$D$"WRITE"O$",B"B
|
||||
220 IF C$ <> M$ THEN PRINT C$;
|
||||
230 B = B + 1
|
||||
240 GOTO 170
|
||||
|
||||
250 POKE 216,0
|
||||
260 IF PEEK(222) <> 5 THEN RESUME
|
||||
270 PRINT M$D$"CLOSE"I$M$D$"CLOSE"O$
|
||||
Loading…
Add table
Add a link
Reference in a new issue