|
From: | Rik |
Subject: | [Octave-bug-tracker] [bug #55995] "continue" is dynamically, not lexically scoped - callable from functions without for loops |
Date: | Tue, 26 Mar 2019 16:41:11 -0400 (EDT) |
User-agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
Follow-up Comment #11, bug #55995 (project octave): Instead of calling subfcn, I put the continue statement in an outside script. That also correctly errors. Isn't it enough to explain that continue and break must occur within a text block containing a loop, and ignore the part about being in the same file? For example, this errors out correctly even though subfcn is never called. The bareword "continue" in subfcn() is outside any text loop body whatsoever. 1; for i = 1:5 disp ("Before"); #subfcn(); printf ("Call #%d\n", i); disp ("After"); endfor function subfcn () continue; endfunction _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?55995> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |