All Manuals > LispWorks User Guide and Reference Manual > 38 The HCL Package

NextPrevUpTopContentsIndex

variable-information

Function
Summary

Returns information about the variable bindings of a symbol in an environment.

Package

hcl

Signature

variable-information variable &optional env => kind, localp, decls

Arguments

variable

A symbol

env

An environment or nil

Values

kind

nil or one of the keywords :special, :lexical, :symbol-macro and :constant.

localp

A boolean

decls

An a-list

Description

The function variable-information returns information about how the variable symbol is bound in the environment env.

The value of kind will be as follows:

nil

There is no information about variable in env

:special

variable has a special binding in env

:lexical

variable has a lexical binding in env

:symbol-macro

variable has a symbol-macro binding in env

:constant

variable has a constant binding in env

localp will be true if variable is bound by a form that has lexical scope (for example let, lambda) or false if variable has global scope (for example defvar).

decls is an a-list of declarations that refer to variable. The cdr of each pair is specified according to the car of the pair as follows:

dynamic-extent

The cdr is non-nil if variable is declared dynamic-extent in env.

ignore

The cdr is non-nil if variable is declared ignore in env.

type

The cdr is the type specifier that is declared for variable in env if any.

Notes

variable-information is part of the environment access API which is based on that specified in Common Lisp: the Language (2nd Edition) .

See also

augment-environment
declaration-information
define-declaration
function-information
map-environment


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex