Read entire file: Difference between revisions
Content added Content deleted
(Applesoft BASIC) |
|||
Line 257: | Line 257: | ||
CLOSE 1</lang> |
CLOSE 1</lang> |
||
==={{header|Applesoft BASIC}}=== |
|||
<lang gwbasic> 100 D$ = CHR$ (4) |
|||
110 F$ = "INPUT.TXT" |
|||
120 PRINT D$"VERIFY"F$ |
|||
130 PRINT D$"OPEN"F$ |
|||
140 PRINT D$"READ"F$ |
|||
150 ONERR GOTO 210 |
|||
160 GET C$ |
|||
170 POKE 216,0 |
|||
180 S$ = S$ + C$ |
|||
190 PRINT |
|||
200 GOTO 140 |
|||
210 POKE 216,0 |
|||
220 EOF = PEEK (222) = 5 |
|||
230 IF NOT EOF THEN RESUME |
|||
240 PRINT D$"CLOSE"F$</lang> |
|||
==={{header|Commodore BASIC}}=== |
==={{header|Commodore BASIC}}=== |
||
<lang basic>10 rem load the entire contents of some text file as a single string variable. |
<lang basic>10 rem load the entire contents of some text file as a single string variable. |