Common Lisp the Language 2nd Edition


next up previous contents index
Next: Declaration Specifiers Up: Declarations Previous: Declarations

9.1. Declaration Syntax

The declare construct is used for embedding declarations within executable code. Global declarations and declarations that are computed by a program are established by the proclaim construct.

change_begin
X3J13 voted in June 1989 (PROCLAIM-ETC-IN-COMPILE-FILE)   to introduce the new macro declaim which is guaranteed to be recognized appropriately by the compiler and is often more convenient than proclaim for establishing global declarations.
change_end


[Special Form]
declare {decl-spec}*

A declare form is known as a declaration. Declarations may occur only at the beginning of the bodies of certain special forms; that is a declaration may occur only as a statement of such a special form and all statements preceding it (if any) must also be declare forms (or possibly documentation strings in some cases). Declarations may occur in lambda-expressions and in the forms listed here.

define-setf-method              labels
defmacro                        let
defsetf                         let*
deftype                         locally
defun                           macrolet
do                              multiple-value-bind
do*                             prog
do-all-symbols                  prog*
do-external-symbols             with-input-from-string
do-symbols                      with-open-file
dolist                          with-open-stream
dotimes                         with-output-to-string
flet

with-output-to-string forms listed here. known as a declaration.>