lineread
lineread( [p_inputPort] ) =>t/nil/l_results
Description
Parses the next line in the input port into a list that you can further manipulate. It is used by the interpreter’s top level to read in all input and understands SKILL and SKILL++ syntax.
Only one line of input is read in unless there are still open parentheses pending at the end of the first line, or binary infix operators whose right-hand argument has not yet been supplied, in which case additional input lines are read until all open parentheses have been closed and all binary infix operators satisfied. The symbol t is returned if lineread reads a blank input line and nil is returned at the end of the input file.
Arguments
Value Returned
|
A list of the objects read in from the next (logical) input line |
Examples
lineread(piport) ; Reads in the next input expression
f 1 2 + ; First input line of the file being read
3 ; Second input line
=> (f 1 (2 + 3))
lineread(piport)
f(a b c) ; Another input line of the file
=> ((f a b c)) ; Returns a list of input objects
Related Topics
Return to top