NextPrevUpTopContentsIndex

declare

Special Form
Summary

Declares a variable as special, or provides advice to the Common Lisp system.

Package

common-lisp

Signature

declare declaration *

Arguments

declaration

A declaration specifier, not evaluated.

Values

The special form declare behaves computationally as if it is not present (other than to affect the semantics), and is only allowed in certain contexts, such as after the variable list in a let , do , defun , etc.

(Consult the syntax definition of each special form to see if it takes declare forms and/or documentation strings.)

Description

There are two distinct uses of declare : one is to declare Lisp variables as "special" (this affects the semantics of the appropriate bindings of the variables), and the other is to provide advice to help the Common Lisp system (in reality the compiler) run your Lisp code faster, or with more sophisticated debugging options.

Notes

Note the following LispWorks extensions to the Common Lisp definition of declare :

If you use declare to specify types (and so turn off type-checking for the specified symbols) and then supply the wrong type, you may obtain a "Segmentation Violation". You can check this by interpreting the code (rather than compiling it).

See also
compile
compile-file
proclaim

LispWorks Reference Manual - 6 Apr 2005

NextPrevUpTopContentsIndex