close_file🔗
Short description🔗
close_file — Closing a text file.
Signature🔗
close_file( file FileHandle )
Description🔗
The operator close_file closes a file which was opened
via the operator open_file.
Execution information🔗
Execution information
-
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
-
Multithreading scope: global (may be called from any thread).
-
Processed without parallelization.
Parameters🔗
FileHandle (input_control) file(-array) → (handle)
File handle.
Example🔗
(HDevelop)
create_tuple(&FileHandle,0)\;
create_tuple_s(&name,"standard")\;
create_tuple_s(&type,"output")\;
open_file(name,type,&FileHandle)\;
destroy_tuple(name)\;
destroy_tuple(type)\;
/* ... */
/* close the file */
destroy_tuple(FileHandle)\;
Result🔗
If the file handle is correct
close_file returns the value 2 (H_MSG_TRUE).
Otherwise an exception is raised.
Combinations with other operators🔗
Module🔗
Foundation