proclaim
proclaim declaration-specifier → implementation-dependent
declaration-specifier—a declaration specifier.
9.1.0 11Establishes the declaration specified by declaration-specifier in the global environment.
9.1.0 13Such a declaration, sometimes called a global declaration or a proclamation, is always in force unless locally shadowed.
9.1.0 12Names of variables and functions within declaration-specifier refer to dynamic variables and global function definitions, respectively.
The next figure shows a list of declaration identifiers that can be used with proclaim.
IGNORE, IGNORABLE, and DYNAMIC-EXTENT removed as consequence of vote taken at 5-Oct-93 X3J13 meeting.
function removed.
9.2.0 20An implementation is free to support other (implementation-defined) declaration identifiers as well.
(defun declare-variable-types-globally (type vars) (proclaim `(type ,type ,@vars)) type) ;; Once this form is executed, the dynamic variable *TOLERANCE* ;; must always contain a float. (declare-variable-types-globally 'float '(*tolerance*)) → FLOAT
None.
None.
declaim, declare, Section 3.2 (Compilation)
Although the execution of a proclaim form has effects that might affect compilation, the compiler does not make any attempt to recognize and specially process proclaim forms. A proclamation such as the following, even if a top level form, does not have any effect until it is executed:
(proclaim '(special *x*))
If compile time side effects are desired, eval-when may be useful. For example:
(eval-when (:execute :compile-toplevel :load-toplevel) (proclaim '(special *x*)))
In most such cases, however, it is preferrable to use declaim for this purpose.
Since proclaim forms are ordinary function forms, macro forms can expand into them. Barrett: So what?
Sandra: DUMB!
KMP: Tough. I think this is a commonly asked question, and perfectly
appropriate for a Note even though it's not a revelation. Technically,
anything in the Notes should be describable as "so what?" or "dumb"
or we should ask why it's in the Notes and not the Description.