CONSTANTP
Function CONSTANTP
fully complies with [ANSI CL].
Additionally, some non-trivial forms are identified as constants, e.g.,
(
returns CONSTANTP
'(+
1 2 3))T
.
Since DEFCONSTANT
initial value forms are not
evaluated at compile time, CONSTANTP
will not report T
of their
name within the same compilation unit for the null lexical environment. This is
consistent and matches questionable code using the pattern
(if (
. Use
CONSTANTP
form
) (EVAL
form
))EVAL-WHEN
if you need recognition and the value during
compile-time.
EVAL-WHEN
EVAL-WHEN
also accepts the situations (NOT EVAL)
and (NOT COMPILE)
.
The situations EVAL
,
LOAD
and COMPILE
are
deprecated by the spec, and they are not equivalent to the new
standard situations :EXECUTE
,
:LOAD-TOPLEVEL
and :COMPILE-TOPLEVEL
in that they ignore the
top-level form versus non-top-level form distinction.
These notes document CLISP version 2.41 | Last modified: 2006-10-13 |