Check that file exists: Difference between revisions

Content added Content deleted
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
Line 1,172: Line 1,172:
=={{header|Forth}}==
=={{header|Forth}}==


<lang forth>: .exists ( str len -- ) 2dup file-status nip 0= if type ." exists" else type ." does not exist" then ;
<lang forth>: .exists ( str len -- ) 2dup file-status nip 0= if ." exists" else ." does not exist" then type ;
s" input.txt" .exists
s" input.txt" .exists
s" /input.txt" .exists
s" /input.txt" .exists