OK: you changed the documentation to say "enclosing" rather than "current", 
so it is now clear that the present behavior is the intended behavior.  I 
think it would be clearer still to say something explicit about needing a 
`stop` in the code block for `loop` if you want loop to ever stop executing.

Here's why I find the intended behavior puzzling, and this bears on why I 
was puzzled by the reference in the docs to the forever button.  I expected 
that there would be a command line equivalent to clicking a forever 
button.  The docs as they were written suggested that this was true: just 
use loop.  So I tried `loop [go]`, with a `go` protected in the usual way 
by a stopping condition.  Of course, this did not work as expected.

In sum I suggest the documentation I cited to be changed as follows:

    Note: In most circumstances, you should use a forever button in order 
to repeat something forever.  In contrast to `loop`, a forever button will 
stop looping if it calls a procedure that executes `stop`.

Or something like that.  Finally, I wil note that the documentation of 
forever button behavior is not explicit either.
http://ccl.northwestern.edu/netlogo/5.0/docs/programming.html#buttons
"Forever buttons keep running their code over and over again, until either 
the code hits the stop 
<http://ccl.northwestern.edu/netlogo/5.0/docs/dictionary.html#stop> 
command, or you press the button again to stop it."
What it means for "the code" to "hit" the `stop` command is ambiguous.

-- 
You received this message because you are subscribed to the Google Groups 
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netlogo-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to