Check that file exists: Difference between revisions
m
→{{header|Forth}}
m (Improved grammar in comments.) |
|||
Line 1,377:
=={{header|Forth}}==
<syntaxhighlight lang="forth">: .exists ( str len -- )
2dup file-status nip 0= if
s" input.txt" .exists▼
else
s" docs" .exists▼
." does not exist: "
s" /docs" .exists</syntaxhighlight>▼
then
type
;
s" /input.txt" .exists cr
s" /docs" .exists cr
=={{header|Fortran}}==
{{works with|Fortran|90 and later}}
|