READLINE Function

Reads the next line from an open file.

Category: External File
Returned data type: Character
Note: The returned value is a string containing the line that was read from the file.

Syntax

fileobject.READLINE(< >)

Details

The READLINE method reads the next line of data from an open file. A maximum of 1024 bytes are read. The text is returned. Null is returned if there was a condition such as end of file.

Example

file f
string input
 
f.open("C:\filename.txt", "r")
input=f.readline()
f.close()