b = fileread(file_handler, string_variable ‖ string_list);
function reads one or more lines of text from the the file
associated with file_handler
. After the read the file pointer is positioned to the next line in the file. This function reads lines sequentially.
If a string_variable
is provided as a argument, a single line of text is read and placed in the variable, which is either a temporary string
variable or an alphanumeric dictionary item. If the dictionary item is longer than the line of text, blanks will be added at the end. If the item is shorter, the line of text will be truncated.
Alternatively, a string list
can be used as an argument. In this case, all remaining lines in the file are read and stored in string_list
The function returns a logical value of 1 (true) if successful and 0 (false) otherwise.