octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #56032] Weird "if" parsing behavior ignores st


From: Andrew Janke
Subject: [Octave-bug-tracker] [bug #56032] Weird "if" parsing behavior ignores stuff past first expression in some cases
Date: Sat, 30 Mar 2019 06:32:54 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36

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

BTW: this first came up because a user mentioned in IRC that they were doing:


if (x < y) or (v<=0)
  some_stuff()
else
  some_other_stuff()
end


And it wasn't doing what they were expected. Turned out to be a weird
interaction between this behavior and the fact that "or" isn't a keyword. So
that 'or (v<=0)' isn't part of the "if" condition; it's the first line in the
"do-if-condition-is-true" block.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56032>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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