defvar
defvar — defines a global variable with an initial value.
defvar (!symbol, value, constant_p?)
symbolA variable name which has not yet been assigned a value.
valueAny s_exp.
constant_pIf non-nil,
the symbol will be assigned as a constant.
The value of the symbol.
This function defines a global variable with an initial value. If the
constant_p argument is present and non-nil, then the
symbol becomes a constant, and any attempt to set
its value in any scope will fail. If the symbol
already has a value and constant_p is non-nil or absent, then
defvar will return immediately with the current
value of the symbol. If
constant_p is non-nil and the
symbol already has a value, then an error is
generated.
The intent of defvar is to provide a value for a
symbol only if that symbol has not yet been defined. This allows a Gamma or
Lisp file to contain default symbol values which may be overridden before
the file is loaded.
Gamma>defvar(a,7,t);7Gamma>a;7Gamma>a = 5;Assignment to constant symbol: a debug 1>Gamma>b = 9;9Gamma>defvar(b,10);9Gamma>b;9Gamma>