file.read

Syntax

l = file.read(<a><,i>)

Reads entries from a file to a list.

If a file pointer is provided as an argument, then that file is read from. Otherwise, the most recently opened file is used.

If an integer argument is given, then at most that many entries are read. If the end of the file is reached but at least one entry is read, then the list may return fewer entries.

If no integer argument is given to indicate the number of entries to read, then the all available entries are read until the end of the file is reached.

Returns:

l - A list with entries read from the file.

Arguments:

a - Optional file pointer or integer indicate number of entries to read. i - Optional integer indicating the number of entries to read.