close_file ( : : FileType : )

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.


Attention

The files created by the system ('standard_input', 'standard_output' and 'standard_error') cannot be closed.


Parameters

FileType (input_control)
string -> string
Type of file.
Default value: 'output'
List of values: 'input', 'output'


Example
set_file(::'/tmp/horus.txt','input':) > 
close_file(::'input':).

Result

If the output file is available and the parameter is correct close_file returns the value TRUE. Otherwise an exception is raised.


Possible Predecessors

open_file, set_file


See also

open_file



Copyright © 1996-1997 MVTec Software GmbH