ClassesClassesClassesClasses | | | | Operators

fread_linefread_lineFreadLinefread_lineFreadLineFreadLine (Operator)

Name

fread_linefread_lineFreadLinefread_lineFreadLineFreadLine — Read a line from a file.

Signature

fread_line( : : FileHandle : OutLine, IsEOF)

Herror fread_line(const Hlong FileHandle, char* OutLine, Hlong* IsEOF)

Herror T_fread_line(const Htuple FileHandle, Htuple* OutLine, Htuple* IsEOF)

Herror fread_line(const HTuple& FileHandle, char* OutLine, Hlong* IsEOF)

HTuple HFile::FreadLine(HTuple* IsEOF) const

void FreadLine(const HTuple& FileHandle, HTuple* OutLine, HTuple* IsEOF)

HString HFile::FreadLine(Hlong* IsEOF) const

void HOperatorSetX.FreadLine(
[in] VARIANT FileHandle, [out] VARIANT* OutLine, [out] VARIANT* IsEOF)

BSTR HFileX.FreadLine([out] Hlong* IsEOF)

static void HOperatorSet.FreadLine(HTuple fileHandle, out HTuple outLine, out HTuple isEOF)

string HFile.FreadLine(out int isEOF)

Description

The operator fread_linefread_lineFreadLinefread_lineFreadLineFreadLine reads a line from the current input file (including the line skip) defined by the handle FileHandleFileHandleFileHandleFileHandleFileHandlefileHandle. The input file must be opened in ASCII format. The read line is returned in parameter OutLineOutLineOutLineOutLineOutLineoutLine. If the end of the file is reached, IsEOFIsEOFIsEOFIsEOFIsEOFisEOF returns the value 1, otherwise 0.

Parallelization

Parameters

FileHandleFileHandleFileHandleFileHandleFileHandlefileHandle (input_control)  file HFile, HTupleHTupleHFile, HTupleHFileX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

File handle.

OutLineOutLineOutLineOutLineOutLineoutLine (output_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Read line.

IsEOFIsEOFIsEOFIsEOFIsEOFisEOF (output_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Reached end of file.

Example (C)

do {
  fread_line(FileHandle,&Line,&IsEOF) ;
} while(IsEOF==0) ;

Result

If the file is open and a suitable line is read, fread_linefread_lineFreadLinefread_lineFreadLineFreadLine returns the value 2 (H_MSG_TRUE). Otherwise, an exception is raised.

Possible Predecessors

open_fileopen_fileOpenFileopen_fileOpenFileOpenFile

Possible Successors

close_fileclose_fileCloseFileclose_fileCloseFileCloseFile

Alternatives

fread_charfread_charFreadCharfread_charFreadCharFreadChar, fread_stringfread_stringFreadStringfread_stringFreadStringFreadString

See also

open_fileopen_fileOpenFileopen_fileOpenFileOpenFile, close_fileclose_fileCloseFileclose_fileCloseFileCloseFile, fread_charfread_charFreadCharfread_charFreadCharFreadChar, fread_stringfread_stringFreadStringfread_stringFreadStringFreadString

Module

Foundation


ClassesClassesClassesClasses | | | | Operators