Read a character from a text file.
The operator fread_char reads a character from the current input file. Before opening the first file the standard input ('standard_input) is used for reading. It can be reactivated at any time via the operator set_file('standard_input'). If the operator reads beyond the end of the file the operator fread_char returns the character sequence 'eof'. At the end of a line the value 'nl' is returned.
Char (output_control) |
string -> string |
Read character or control string ('nl','eof'). |
repeat > fread_char(:::Char) > (if(::Char = 'nl':) > fnew_line(:::) | if(::Char != 'nl':) > fwrite_string(::Char:)) > until(::Char = 'eof':).
If an input file is open the operator fread_char returns TRUE. Otherwise an exception is raised.
open_file, close_file, get_file, set_file, fread_string