Check that file exists: Difference between revisions

(→‎{{header|Perl}}: add Perl 6 entry)
Line 454:
<lang logo>setprefix "/
show file? "input.txt</lang>
=={{header|Lua}}==
<lang lua>function output( s, b )
if b then
print ( s, " does not exist." )
else
print ( s, " does exist." )
end
end
 
output( "input.txt", io.open( "input.txt", "r" ) == nil )
output( "/input.txt", io.open( "/input.txt", "r" ) == nil )
output( "docs", io.open( "docs", "r" ) == nil )
output( "/docs", io.open( "/docs", "r" ) == nil )</lang>
 
=={{header|Mathematica}}==
Anonymous user