Fclose » History » Version 4
Per Amundsen, 12/26/2018 08:09 PM
| 1 | 1 | Per Amundsen | _Added in 1.8.10_ |
|---|---|---|---|
| 2 | |||
| 3 | */fclose <handle>* |
||
| 4 | |||
| 5 | Closes the file associated with this handle. |
||
| 6 | |||
| 7 | 3 | Per Amundsen | If you specify a [[Scripting_Wildcards|wildcard]], all matching handles are closed. |
| 8 | 1 | Per Amundsen | |
| 9 | *Parameters* |
||
| 10 | |||
| 11 | <handle> - The handle to close. |
||
| 12 | |||
| 13 | *Example* |
||
| 14 | |||
| 15 | <pre> |
||
| 16 | alias example { |
||
| 17 | 4 | Per Amundsen | ; Open a file. |
| 18 | 1 | Per Amundsen | /fopen -o x example.txt |
| 19 | |||
| 20 | 4 | Per Amundsen | ; write to the file. |
| 21 | 1 | Per Amundsen | /fwrite x Print this line. |
| 22 | |||
| 23 | 4 | Per Amundsen | ; Close the file handle. |
| 24 | 1 | Per Amundsen | /fclose x |
| 25 | } |
||
| 26 | </pre> |