Expand/Shrink

read_lines

Definition: object o = read_lines(object filename)
Description: Return the contents of a text file as a sequence of lines.
pwa/p2js: Not supported.
Comments: In Phix this is just a simple wrapper for get_text, and as such does not support reading from stdin(0).

The filename parameter can be a string, in which case the file is opened and closed by this routine, or an integer from a previous call to open(), in which case it is not closed by this routine.

If the file cannot be opened, -1 is returned.
Implementation: See builtins\pfile.e (an autoinclude) for details of the actual implementation.
See Also: get_text, open, write_lines