QUOTE(3cl)

Common Lisp Reference

QUOTE(3cl)

 

NAME

quote – suppress evaluation (special operator)

SYNOPSIS


quote object object
 

ARGUMENTS and VALUES

form—a form, evaluated as described below.

read-only-p—a boolean, not evaluated.

object—the primary value resulting from evaluating form.

DESCRIPTION

The quote special operator just returns object.

The consequences are undefined if literal objects (including quoted objects) are destructively modified.

AFFECTED BY

(none)

EXCEPTIONAL SITUATIONS

(none)

NOTES

The textual notation object is equivalent to (quote object ).

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 a 1 ) 1
( quote ( setq a 3 )) ( SETQ A 3 )
a 1
a A
’’ a ( QUOTE A )
’’’ a ( QUOTE ( QUOTE A ))
( setq a 43 ) 43
( list a ( cons a 3 )) ( 43 ( 43 . 3 ))
( list ( quote a ) ( quote ( cons a 3 ))) ( A ( CONS A 3 ))
1 1
1 1
"foo" "foo"
"foo" "foo"
( car ’( a b )) A
’( car ’( a b )) ( CAR ( QUOTE ( A B )))
#( car ’( a b )) #( CAR ( QUOTE ( A B )))
’#( car ’( a b )) #( CAR ( QUOTE ( A B )))

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.