(read string)


Determine the first item in a string.


This function returns the first list item or atom in the string. Spaces may not be used within the string argument unless they are within a list or string.

Examples

Code Returns Type
(read "one" ) ONE Atom.
(read "one two" ) ONE Atom.
(read " (1 2 3) (1) " ) (1 2 3) List.
(read " (one two) " ) (ONE TWO) List.
(read "12") 12 Integer.
(read "\"First Name:\"") "First Name:" String.

Tell me about...

(car list)

(cdr list)

(last list)

(print [expression [file-descriptor]])

(read-char [file-descriptor])

(write-line string [file-descriptor])

LISP Compatibility

Programming Overview of LISP (LISt Processing) Language