MAKE

Syntax

MAKE name object

Explanation

MAKE defines a variable using the name of the first input and assigns the second input as the value of that variable.

Once you have created the variable, you can get its contents by using :name. Think of the colon as "the value of name".

To keep a variable local to the procedure in which MAKE is used, see LOCAL or PUBLIC. See also NAME and THING.

Examples

? MAKE "NUMBER 73

? :NUMBER

Result: 73

? MAKE "COLOR "MAGENTA

? :COLOR

Result: MAGENTA

? MAKE "CHOICE FIRST [A B C D]

? :CHOICE

Result: A

? TO NAME.A.TREE

>   PR [WHAT IS THE LATIN NAME OF THAT TREE?]

>   MAKE "ANSWER READLIST

>   PR SENTENCE :ANSWER [HAS RED LEAVES]

> END

NAME.A.TREE defined.

? NAME.A.TREE

WHAT IS THE LATIN NAME OF THAT TREE?

? ACER ROBUSTUS

ACER ROBUSTUS HAS RED LEAVES

?