Two constructs, defword and defarray, allow single words and regions of memory to be named and initialized to definite values when the program is loaded.
(defword name value)
Defword is intended for use as a top-level form but actually it may appear anywhere a statement may appear. When executed as a statement it does nothing.
Defword defines the name name to globally refer to a particular unique memory location, whose initial value when the program is loaded is value. This meaning of name can be shadowed within subroutines that have name as a formal argument, or within the body of a let statement that binds that name. The name can be used as a place in data-modification statements.
Actually the name will only be recognized to refer to the memory location at statements in the program that occur textually after the defword declaration.
value value ... )
(defarray name
Defarray is intended for use as a top-level form, but actually it may appear anywhere a statement may appear. When executed as a statement it does nothing.
Defarray sets aside a contiguous region of memory, containing a number of words equal to the number of value arguments, and defines the name name to globally (that is, after the defarray) refer to the address of the first word in the region. The words are initialized to the given values when the program is first loaded. Name can be used as an array in array-dereference operations. It is a compile-time error to attempt to change the value of name. However, name can be shadowed by subroutine arguments and local variable declarations.