This agent exits immediately from the enclosing procedure, ask, or ask-like construct (e.g. crt, hatch, sprout). Only the enclosing procedure or construct stops, not all execution for the agent.
if not any? turtles [ stop ] ;; exits if there are no more turtles
Note: stop
can also be used to stop a forever button. See Buttons in the Programming Guide for details.
stop
can also be used to stop a BehaviorSpace model run. If the go commands directly call a procedure, then when that procedure calls stop, the run ends.
Take me to the full NetLogo Dictionary