Close current text file
The operator close_file closes a file which was opened via the operator open_file. The current file is closed determining via FileType whether the input ('input') or output file ('output') is closed. After closing a file, at first (until the next call of the operator set_file or open_file) the standard output or standard input, respectively, is activated.
The files created by the system ('standard_input', 'standard_output' and 'standard_error') cannot be closed.
FileType (input_control) |
string -> string |
Type of file. | |
Default value: 'output' | |
List of values: 'input', 'output' |
set_file(::'/tmp/horus.txt','input':) > close_file(::'input':).
If the output file is available and the parameter is correct close_file returns the value TRUE. Otherwise an exception is raised.