[REBOL] Breaking out of loops
From: tedlandis:rogers at: 27-Nov-2002 14:12
Greetings again,
When breaking out of a loop what is the best way to indicate this? for
example:
loop 100 [
...
if a = b [break]
...
]
How do I tell if the loop was completed (all 100 iterations) or was
terminated prematurely?
Since all counter words (in for, repeat, etc.) seem to be local to the
block, I am thinking something like:
if loop 100 [
...
if a = b [break/return "Aborted"]
...
] = "Aborted" [do something else]
...but that doesn't seem very "clean"...
Thanks,
Ted