Fclose » History » Version 6
Per Amundsen, 02/22/2023 04:52 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 | 6 | Per Amundsen | _See also [[/fopen]], [[/fwrite]], [[/fseek]], [[/flist]], [[$fread]], [[$fgetc]], [[$feof]], [[$ferr]], [[$fopen]]._ |
10 | |||
11 | 1 | Per Amundsen | *Parameters* |
12 | |||
13 | 5 | Per Amundsen | table(ktable). |
14 | |*Parameter*|*Description*| |
||
15 | | <handle> | The handle to close. | |
||
16 | 1 | Per Amundsen | |
17 | *Example* |
||
18 | |||
19 | <pre> |
||
20 | alias example { |
||
21 | 4 | Per Amundsen | ; Open a file. |
22 | 1 | Per Amundsen | /fopen -o x example.txt |
23 | |||
24 | 4 | Per Amundsen | ; write to the file. |
25 | 1 | Per Amundsen | /fwrite x Print this line. |
26 | |||
27 | 4 | Per Amundsen | ; Close the file handle. |
28 | 1 | Per Amundsen | /fclose x |
29 | } |
||
30 | </pre> |