fread_string ( : : FileHandle : OutString, IsEOF )

Read strings from a text file.

The operator fread_string reads a string from the current input file. A string begins with the first representable character: letters, numbers, additional characters (except blanks). A string ends when a blank or a line skip is reached. Several successive line skips are ignored. If the end of the file is reached IsEOF return the value 1, otherwise 0.


Parameters

FileHandle (input_control)
file -> integer
File handle.

OutString (output_control)
string -> string
Read character sequence.

IsEOF (output_control)
integer -> integer
Reached end of file.


Example
fwrite_string(FileHandle,'Please enter text and return: ..') 
fread_string(FileHandle,String,IsEOF) >
fwrite_string(FileHandle,['here it is again: ',String]) 
fnew_line(FileHandle).

Result

If a file is open and a suitable string is read fread_string returns the value 2 (H_MSG_TRUE). Otherwise an exception handling is raised.


Parallelization Information

fread_string is reentrant and processed without parallelization.


Possible Predecessors

open_file


Possible Successors

close_file


Alternatives

fread_char, read_string, fread_line


See also

open_file, close_file, fread_char, fread_line


Module

Foundation



Copyright © 1996-2008 MVTec Software GmbH