QUOTE(3cl) |
Common Lisp Reference |
QUOTE(3cl) |
NAME
quote – suppress evaluation (special operator)
SYNOPSIS
|
ARGUMENTS and VALUES
—a form, evaluated as described below.
—a boolean, not evaluated.
—the primary value resulting from evaluating .
DESCRIPTION
The quote special operator just returns .
The consequences are undefined if literal objects (including quoted objects) are destructively modified.
AFFECTED BY
(none)
EXCEPTIONAL SITUATIONS
(none)
NOTES
The textual notation ’ is equivalent to (quote ).
Some objects, called self-evaluating objects, do not require quotation by quote. However, symbols and lists are used to represent parts of programs, and so would not be useable as constant data in a program without quote. Since quote suppresses the evaluation of these objects, they become data rather than program.
EXAMPLES
(
setq
1
)
1
(
quote
(
setq
3
))
(
SETQ
3
)
1
’
’’
(
QUOTE
)
’’’
(
QUOTE
(
QUOTE
))
(
setq
43
)
43
(
list
(
cons
3
))
(
43
(
43
.
3
))
(
list
(
quote
)
(
quote
(
cons
3
)))
(
(
CONS
3
))
1
1
’
1
1
"foo"
"foo"
’
"foo"
"foo"
(
car
’(
))
’(
car
’(
))
(
CAR
(
QUOTE
(
)))
#(
car
’(
))
#(
CAR
(
QUOTE
(
)))
’#(
car
’(
))
#(
CAR
(
QUOTE
(
)))
SEE ALSO
(none)
AUTHOR and COPYRIGHT
Substantial portions of this page are taken from draft proposed American National Standard for Information Systems—Programming Language—Common Lisp, X3J13/94-101R, Version 15.17R, Fri 12-Aug-1994 6:35pm EDT; no copyright indicated.
Additional clarification and comments by Michael Marking <marking@tatanka.com>, http://www.tatanka.com/software/cl-manpages/; alternatively, https://github.com/wakinyantanka/cl-manpages/. Copyright 2017 Michael Marking as both an original and a derivative work.
Licensed under Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0).
This page last revised Sunday 26 February 2017.