Check that file exists: Difference between revisions
m
more description, correct error handling
m (shorten by one line) |
m (more description, correct error handling) |
||
Line 60:
=={{header|Applesoft BASIC}}==
The error code for FILE NOT FOUND is 6.
<lang ApplesoftBasic>
110 T$(0) = "DOES NOT EXIST."
120 T$(1) = "EXISTS."
Line 67:
150 END
200
▲220 REM TRY
230 PRINT CHR$(4); "VERIFY "; F$
240 POKE 216, 0 :
250
260
300 REM CATCH
270 POKE 216, 0 : IF E THEN RESUME▼
310 E = PEEK(222) <> 6
280 REM END TRY▼
299 RETURN</lang>▼
340 CALL - 3288 : REM RECOVER
</lang>
=={{header|AutoHotkey}}==
|