[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: John W. Eaton
Subject: [Octave-bug-tracker] [bug #55995] "continue" is dynamically, not lexically scoped - callable from functions without for loops
Date: Mon, 25 Mar 2019 23:45:59 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #4, bug #55995 (project octave):

Fixing continue to work like break is fairly simple.  See the attached patch.

In Matlab, is this a parse error, or a run-time error?  I think you could
check with something like

function foo (cond)
  if (cond)

and if this fails with an error when you execute "foo (false)", then it looks
like a parse error to me.  If it only fails when executing "foo (true)", then
we are still not compatible because Octave detects break outside of a loop
when the function is parsed.

I don't remember whether I asked this question when I made break error when it
appears outside of a loop, but it occurs to me now...

(file #46639)

Additional Item Attachment:

File name: continue-diffs.txt             Size:1 KB


Reply to this item at:


  Message sent via Savannah

reply via email to

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