| Allegro CL version 8.2 Minimal update since 8.2 release. 8.1 version |
Arguments: symbol &optional env all-declarations
This function returns information about the variable named by symbol
in the environment env. env
may be an environment object or nil
, indicating
the null lexical environment.
all-declarations is a boolean which requests a
building of the full alist to be provided as the third return value
from this function. It is provided in order to reduce consing when
its value is nil
, since most declarations are
ignorable by an implementation and thus it is not necessary to cons the
alist every time.
Four values are returned.
nil
: there is no binding or definition of
symbol.
:special
: symbol names a
special variable.
:lexical
: symbol names a
lexical variable.
:symbol-macro
: symbol refers
to a symbol-macrolet binding.
:constant
: symbol names a
constant defined by defconstant or symbol is a
keyword.
:constant
, then the second value returned is an
actual value, and not a value housed within a locative. This ensures
that the value is not changed by replacing it in the (non-existent)
locative.
:special
, then the second value is nil
, because the value is dynamic and can be best
accessed via symbol-value.
nil
. If this is the case, only those
declarations which have been actually stored into the environment
object will be present in the alist; in general, if the symbol has no
lexical binding and all-declarations is nil
, then this third return value will also be
nil
. If all-declarations
is true, then applicable declarations are also be gathered from the
global environment. Note: the special
declaration has special meaning in the context of variable-information; it never shows up in a
declaration list, but instead shows up with the label
:special
in the first return value.
nil
if not. (In CLtL-2, this local/global boolean is
the second returned value.)
See environments.htm for more information on environments.
Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.
| Allegro CL version 8.2 Minimal update since 8.2 release. 8.1 version |