Reads a string from the keyboard or from an open file, until an end-of-line marker is encountered
(read-line [file-desc])
Arguments
open) referring to an open file. If no file-desc is specified, read-line obtains input from the keyboard input buffer.
A file descriptor (obtained fromReturn Values
read-line, without the end-of-line marker. If read-line encounters the end of the file, it returns nil.
The string read byExamples
Open a file for reading:
Command: (setq f (open "c:\\my documents\\new.tst" "r"))
#<file "c:\\my documents\\new.tst">
read-line to read a line from the file:
UseCommand: (read-line f)
"To boldly go where nomad has gone before."
Obtain a line of input from the user:
Command: (read-line)
To boldly go
"To boldly go"