Read strings from a text file.
The operator fread_string reads a string from the current input file up to the end of the line. 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. 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').
OutString (output_control) |
string -> string |
Read character sequence. |
fwrite_string(::'Bitte Text und Return eingeben: ..':) > fread_string(:::String) > fwrite_string(::['hier ist der Text: ',String]:) > fnew_line(:::).
If a file is open and a suitable string is read fread_string returns the value TRUE. If the operator reads beyond the end of the file the operator fread_string returns FAIL. Otherwise an exception is raised.
open_file, close_file, get_file, set_file, fread_char