[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #55995] "continue" is dynamically, not lexical

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.


for i = 1:5
  disp ("Before");
  printf ("Call #%d\n", i);
  disp ("After");

function subfcn ()


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]