close_fileT_close_fileCloseFileCloseFile (Operator)

Name

close_fileT_close_fileCloseFileCloseFile — 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()

Description

The operator close_fileclose_fileCloseFileCloseFileCloseFile closes a file which was opened via the operator open_fileopen_fileOpenFileOpenFileOpenFile.

Execution Information

Parameters

FileHandleFileHandleFileHandleFileHandlefileHandle (input_control)  file(-array) HFile, HTupleHTupleHtuple (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_fileCloseFileCloseFileCloseFile returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.

Possible Predecessors

open_fileopen_fileOpenFileOpenFileOpenFile

See also

open_fileopen_fileOpenFileOpenFileOpenFile

Module

Foundation