(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...
(print [expression [file-descriptor]])