.KeyWordIO.readLineWithoutCache

Information

Syntax

(string, endOfFile) = readLine(fileName, lineNumber)

Description

Function readLine(..) opens the given file, reads enough of the content to get the requested line, and returns the line as a string. Lines are separated by LF or CR-LF; the returned string does not contain the line separator.

If lineNumber > countLines(fileName), an empty string is returned and endOfFile=true. Otherwise endOfFile=false.

Interface

function readLineWithoutCache
  extends Modelica.Icons.Function;
  input String fileName "Name of the file that shall be read" annotation(
    Dialog(__Dymola_loadSelector(filter = "Text files (*.txt; *.dat)", caption = "Open file in which Real parameters are present")));
  input Integer lineNumber(min = 1) "Number of line to read";
  output String string "Line of text";
  output Boolean endOfFile "If true, end-of-file was reached when trying to read line";
end readLineWithoutCache;

Generated at 2019-09-16T01:37:28Z by OpenModelicaOpenModelica 1.14.0~dev-26728-gbf603de using GenerateDoc.mos