Search                        Top                                  Index
HELP LISTREAD                                       Aaron Sloman  Dec 1978

    listread() -> <list>

This procedure of no arguments reads a list from the current input stream
(i.e. *PROGLIST). The list may extend over several lines, but it must have
properly nested list-brackets; for example:

    vars list;
    listread() -> list;
    [a [a b [c] d] a b]

    list =>
    ** [a [a b [c] d] a b]

Special symbols (such as '%' and '^') which are handled specially by the
compiler when found in lists are merely included as list elements when read by
LISTREAD; for example

    vars x y;
    "cats" -> x;
    "dogs" -> y;

    [^x hate ^y] =>
    ** [cats hate dogs]

    listread() -> list;
    [^x hate ^y]

    list =>
    ** [^ x hate ^ y]

Unlike READLINE, LISTREAD makes nested lists. Also, LISTREAD requires the
brackets to be in the input stream, whereas READLINE makes a list of whatever
it finds.

See also HELP
    *READLINE    - to read in other types of items
    *REQUESTLINE - similar to READLINE, but its argument is used as prompt
    *GETLINE     - prints a line of text, then uses READLINE to read a line
    *READTILL    - reads from input stream until a specified item is read