Name
ReadLine -- read a line from the specified file
Synopsis
string$ = ReadLine(id[, lf])
Function
This command reads characters from the file specified by id until a line feed character occurs. Neither line feed nor carriage return characters are included in the destination string. This function also terminates when it reaches the end-of-file mark. The string read is returned.

Starting with Hollywood 9.0, there is an optional lf argument. If this is set to True, ReadLine() will also include newline characters (i.e. line feed and carriage return) if present in the source file. Note that no platform adaptation will take place in that case. If lf is set to True, ReadString() will return the exact newline characters that are in the source file, i.e. you might get line feed, carriage return and line feed or just carriage return, depending on the file's contents.

Inputs
id
identifier an open file
lf
optional: whether or not to include newline characters in the string (defaults to False) (V9.0)
Results
string$
receives the line read
Example
See OpenFile


Show TOC