FANDOM


Syntax

EACH list

Explanation

EACH causes each of the currently active turtles to executes the commands contains in its argument sequentialy. This allows each of several turtles to be given a variable input or to be addressed by WHO or its current number.

See also ASK, SETTURTLES, TELL, and WHO.

Example

TO MANY.HEADINGS

TELL [0 1 2 3 4 5 6 7]
PENDOWN ST
EACH [SETH 45 * WHO SETPC WHO FD 30]

END

This procedure causes eight turtles to change their color to the same value as their turtle number. They then move apart in different directions.

? MANY.HEADINGS
Pc logo 17

This is a result of the "MANY.HEADINGS" procedure.

?

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.