Check that file exists: Difference between revisions

(GNU APL example)
Line 288:
=={{header|APL}}==
<lang apl>
h ← ⎕fio['fopen'] 'sampletext-1input.txt'
h
7
⎕fio['fstat'] h
66311 821146803134 33188 1 1000 1000 0 11634 4096 24 16397059301642047105 16397059301642047105 16397059301642047105
⎕fio['fclose'] h
0
h ← ⎕fio['fopen'] 'does_not_exist.txtdocs/'
h
¯1
h ← ⎕fio['fopen'] '/'
h
7
⎕fio['fstat'] h
66311 23296858 16877 302 01000 01000 0 4096 4096 8 16377246751642047108 16377247101642047108 16377247101642047108
⎕fio['fclose'] h
0
h ← ⎕fio['fopen'] '/does_not_exist.txt'
h
¯1
</lang>
 
67

edits