[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54465] Short Circuit Operators not working wi
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #54465] Short Circuit Operators not working with negation operator |
Date: |
Wed, 8 Aug 2018 15:01:54 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0 |
Update of bug #54465 (project octave):
Status: None => Confirmed
Release: 4.2.1 => dev
Summary: Short Circuit Operators not working for ~functions
=> Short Circuit Operators not working with negation operator
_______________________________________________________
Follow-up Comment #1:
Confirmed. Incidentally, version 4.2.1 is very old and no longer supported.
You will have a better experience if you can update to the latest stable
version. But, I confirmed this on the current development code as well.
Here is an even more concise example:
clear b;
if ((! 0) || b == 2)
disp ('Octave short-circuit');
end
if ((! 0) | b == 2)
disp ('Matlab short-circuit');
end
I used Octave's own negation operator just to make sure there wasn't something
funny going on. I also removed the call to exist() and just use a constant.
Octave's own short-circuiting operator works in this case, so this is an error
in the parser because within if statements the '|' operator should map to '||'
for logical statements.
Adding jwe to the CC list since he has spent the most time with this code.
(file #44741)
_______________________________________________________
Additional Item Attachment:
File name: tst_sc.m Size:0 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?54465>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #54465] Short Circuit Operators not working for ~functions, Andrew Lofts, 2018/08/08
- [Octave-bug-tracker] [bug #54465] Short Circuit Operators not working with negation operator,
Rik <=
- [Octave-bug-tracker] [bug #54465] Short Circuit Operators not working with negation operator, John W. Eaton, 2018/08/08
- [Octave-bug-tracker] [bug #54465] Short Circuit Operators not working with negation operator, John W. Eaton, 2018/08/08
- [Octave-bug-tracker] [bug #54465] Short Circuit Operators not working with negation operator, Rik, 2018/08/08
- [Octave-bug-tracker] [bug #54465] Short Circuit Operators not working with negation operator, Rik, 2018/08/09
- [Octave-bug-tracker] [bug #54465] Short Circuit Operators not working with negation operator, Rik, 2018/08/28
- [Octave-bug-tracker] [bug #54465] Short Circuit Operators not working with negation operator, John W. Eaton, 2018/08/28
- [Octave-bug-tracker] [bug #54465] Short Circuit Operators not working with negation operator, Rik, 2018/08/28
- [Octave-bug-tracker] [bug #54465] Short Circuit Operators not working with negation operator, John W. Eaton, 2018/08/28
- [Octave-bug-tracker] [bug #54465] Short Circuit Operators not working with negation operator, Rik, 2018/08/28