$feof » History » Version 2
Per Amundsen, 01/07/2019 05:38 PM
1 | 1 | Per Amundsen | _Added in 1.9.0_ |
---|---|---|---|
2 | |||
3 | *$feof* |
||
4 | |||
5 | Returns [[$true]] if end of file was reached during the last file access attempt, otherwise [[$false]]. |
||
6 | |||
7 | 2 | Per Amundsen | _Can be used inside text without being surrounded by white spaces._ |
8 | |||
9 | 1 | Per Amundsen | *Example* |
10 | |||
11 | <pre> |
||
12 | ; Open a file. |
||
13 | /fopen Example Example.txt |
||
14 | |||
15 | ; Add some text to the file. |
||
16 | /fwrite Example Hello World |
||
17 | |||
18 | ; Read the text. |
||
19 | //echo -ag $fread(Example) |
||
20 | |||
21 | ; Close the file. |
||
22 | /fclose Example |
||
23 | |||
24 | ; Delete the file. |
||
25 | /remove Example |
||
26 | |||
27 | ; Print the status from $feof. |
||
28 | //echo -ag File $IIf($feof,was,was not) read to end |
||
29 | </pre> |