ASK

Synopsis
ASK turtle instructionlist
Description

Instructs a specific turtle to run a given set of instructions (which are usually turtle instructions).

ASK selects the turtle whose index matches the turtle input, runs instructionlist, then reselects the previous turtle.

ASK outputs whatever instructionlist outputs. If instructionlist does not output anything, then ASK doesn't output anything, either.

Example

Send four turtles in four different directions:

REPEAT 4 [ASK REPCOUNT [ RIGHT 90 * REPCOUNT FORWARD 100 ]

See Also
SETTURTLE

SourceForge.net Logo