Assignment Operators — (=, :=,
::=)
symbol = s_exp
symbol := s_exp
symbol ::= s_exp
symbolAny valid symbol.
s_expAny expression.
The assigned value.
= is used to assign a value to a variable.
:= is used to assign a value only if no value is currently assigned to
the symbol. If the symbol
already has a value then the symbol keeps its
original value.
::= is used to assign a constant. Once the assignment has been made no
changes to the symbol are allowed. Attempted
changes to the symbol will generate an
error.
Gamma>a = 5;5Gamma>a := 6;5Gamma>a;5Gamma>b ::= 7;7Gamma>b = 8;Assignment to constant symbol: b debug 1>Gamma>b ::= 9;Defvar of defined constant: b debug 1>Gamma>