FANDOM


Names, or variables, are Logo identifers that store information. The information they store are Logo objects such as numbers, words, lists, property lists, or arrays. Think of Logo names as containers which hold the values or objects assigned to them. Names are always preceded by a colon (:), called dots in Logo parlance. The dots in front of a Logo name inform Logo to use the object named by the variable rather than the name itself.

There are three types of variables in Logo: local, public, and global. Local variables are created by a single procedure and exist only when that procedure is running. Public variables are created within a procedure and are only available to that procedure and any procedures that procedure calls. Global variables are created with the MAKE or NAME primitive and are available in Logo workspace to be recalled and used at any time by any procedure or any Logo operation.

Here is an example of using MAKE to assign a name to a word and to a list and then using the names with the Logo primitive PRINT.

? MAKE "GREETING "HELLO

? MAKE "SALUTATION [HOW ARE YOU?]

? PRINT :GREETING

HELLO

? PRINT :SALUTATION

HOW ARE YOU?

?

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.