Turtle, Observer, Patch

stop

Description:
Exits the current procedure immediately.

Examples:
to check-patch-color
if pc-ahead = red [rt 90 stop]
if pc-ahead = green [lt 90 stop]
fd 1
end

This procedure will cause turtles to turn right and then exit the procedure if the the patch ahead is red, turn left and exit the procedure if the patch ahead is green, and only move forward one if the patch ahead was not green or red.

Notes:
Note: stop does not stop any callers of the procedure, only the procedure itself.

Related Commands:
end loop output to