Check that file exists: Difference between revisions

Content added Content deleted
imported>J7M
(add SmallBASIC example)
Line 821: Line 821:
ENTER FILENAME TO CHECK? NOFILE.DOC
ENTER FILENAME TO CHECK? NOFILE.DOC
'NOFILE.DOC' IS NOT HERE.</pre>
'NOFILE.DOC' IS NOT HERE.</pre>

==={{header|SmallBASIC}}===
<syntaxhighlight lang="qbasic">
if(isdir("docs")) then print "directory docs exist"
if(isdir("/docs")) then print "directory /docs exist"
if(isfile("input.txt")) then print "file input.txt exist"
if(isfile("/input.txt")) then print "file /input.txt exist"
</syntaxhighlight>



=={{header|BASIC256}}==
=={{header|BASIC256}}==
<syntaxhighlight lang="basic256">subroutine opener (filename$)
<syntaxhighlight lang="basic256">subroutine opener (filename$)