Variables in POOL

Variables are a way to store data during the program execution. LOGO allows to create a variable in any place in the code, giving a name to it and optionally an initial value. Variables are not typed, any type can be assigned to a variable and one variable can store different types during its lifetime.

There are three cathegories of variables that differ in the access scope and access methods: global and local variables (known in many LOGO dialects) and shared variables introduced in POOL.
The instructions make, localmake and their synonims allow to create a variable and also to assign a new value to an existing variable. When a name is used to access a variable, the appropriate variable is selected in the following order:

- local variables are searched, in the order reverse to the order of their creation (variables created in the most nested function are browsed first);

- then global variables are searched;

- shared variables are searched as the last.

See also:

Data types
Variables, data access

Table of Content