Quoted Expressions
Date: 2020-10-07 18:10:00

Up | Next | Prev | PrevTail | Tail

### 17.3 Quoted Expressions

Because symbolic evaluation requires that each variable or expression has a value, it is necessary to add to REDUCE the concept of a quoted expression by analogy with the Lisp QUOTE function. This is provided by the single quote mark ’. For example,

’a | represents the Lisp S-expression | (quote a)
’(a b c) | represents the Lisp S-expression | (quote (a b c))

Note, however, that strings are constants and therefore evaluate to themselves in symbolic mode. Thus, to print the string "A String", one would write

prin2 "A String";

Within a quoted expression, identiﬁer syntax rules are those of REDUCE. Thus (A !. B) is the list consisting of the three elements A, ., and B, whereas (A . B) is the dotted pair of A and B.

Up | Next | Prev | PrevTail | Front