From: Robert D. <rob...@gm...> - 2014-04-28 03:36:32
|
On 2014-04-27, Barton Willis <wi...@un...> wrote: > For a workaround, see user documentation for "catch" and "throw." Expanding on this suggestion, how about: foo (j) := catch (for i thru 10 do block (blah, blah, blah, if i=j then throw(i))); foo (5); => 5 foo (20); => done Note that throw/catch is a "nonlocal" mechanism -- 'throw' could be buried within nested blocks or functions calls. best Robert Dodier |