ob

Help Contents First Steps In Logo Built-in instructions ob
local run

ob


There is another instruction to create variables - it is called ob and its name comes from Geomland - a nice and powerful Geometry-oriented Logo implementation. This instruction works the same way as make except that it creates links between variables.

Consider the following example:

ob "a 1
ob "b :a*:a
ob "c :b*:b
print :a :b :c ; prints 1 1 1
ob "a 2
print :a :b :c ; prints 2 4 16
ob "a 3
print :a :b :c ; prints 3 9 81

By the use of ob you politely ask Logo to remember the relationship between variables and when you change only one of them, all dependents will be recalculated automatically.

Examples:

References:

local run