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