close_fileT_close_fileCloseFileCloseFileclose_file (Operator)

Name

close_fileT_close_fileCloseFileCloseFileclose_file — Closing a text file.

Signature

close_file( : : FileHandle : )

Herror T_close_file(const Htuple FileHandle)

void CloseFile(const HTuple& FileHandle)

static void HFile::CloseFile(const HFileArray& FileHandle)

void HFile::CloseFile() const

static void HOperatorSet.CloseFile(HTuple fileHandle)

static void HFile.CloseFile(HFile[] fileHandle)

void HFile.CloseFile()

def close_file(file_handle: MaybeSequence[HHandle]) -> None

Description

The operator close_fileclose_fileCloseFileCloseFileCloseFileclose_file closes a file which was opened via the operator open_fileopen_fileOpenFileOpenFileOpenFileopen_file.

Execution Information

Parameters

FileHandleFileHandleFileHandleFileHandlefileHandlefile_handle (input_control)  file(-array) HFile, HTupleMaybeSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)

File handle.

Example (HDevelop)

open_file ('standard', 'output', FileHandle)
* ....
close_file(FileHandle)

Example (C)

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);

Example (HDevelop)

open_file ('standard', 'output', FileHandle)
* ....
close_file(FileHandle)

Example (HDevelop)

open_file ('standard', 'output', FileHandle)
* ....
close_file(FileHandle)

Example (HDevelop)

open_file ('standard', 'output', FileHandle)
* ....
close_file(FileHandle)

Result

If the file handle is correct close_fileclose_fileCloseFileCloseFileCloseFileclose_file returns the value 2 ( H_MSG_TRUE) . Otherwise an exception is raised.

Possible Predecessors

open_fileopen_fileOpenFileOpenFileOpenFileopen_file

See also

open_fileopen_fileOpenFileOpenFileOpenFileopen_file

Module

Foundation