RosettaCodeData/Task/Check-that-file-exists/BBC-BASIC/check-that-file-exists.bbc
Ingy döt Net 518da4a923 B
2013-04-10 16:19:29 -07:00

23 lines
505 B
Text

test% = OPENIN("input.txt")
IF test% THEN
CLOSE #test%
PRINT "File input.txt exists"
ENDIF
test% = OPENIN("\input.txt")
IF test% THEN
CLOSE #test%
PRINT "File \input.txt exists"
ENDIF
test% = OPENIN("docs\NUL")
IF test% THEN
CLOSE #test%
PRINT "Directory docs exists"
ENDIF
test% = OPENIN("\docs\NUL")
IF test% THEN
CLOSE #test%
PRINT "Directory \docs exists"
ENDIF