[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52016] conversion to short circuit in if, whi
From: |
Ernst Reissner |
Subject: |
[Octave-bug-tracker] [bug #52016] conversion to short circuit in if, while but not in until |
Date: |
Thu, 14 Sep 2017 05:43:08 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0 |
Follow-up Comment #1, bug #52016 (project octave):
There is another place in the manual also: Section 8.5.2:
matlab has special behavior that allows the operators ‘&’ and ‘|’ to
short-circuit when
used in the truth expression for if and while statements. Octave behaves the
same way for
compatibility, however, the use of the ‘&’ and ‘|’ operators in this
way is strongly discouraged
and a warning will be issued. Instead, you should use the ‘&&’ and
‘||’ operators that always
have short-circuit behavior.
One could mention until also:
As matlab does not support until-statement,
in octave, & and | behave regularly in until-conditions.
Also a reference to the warning would be fine.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52016>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #52016] conversion to short circuit in if, while but not in until, Ernst Reissner, 2017/09/14
- [Octave-bug-tracker] [bug #52016] conversion to short circuit in if, while but not in until,
Ernst Reissner <=
- [Octave-bug-tracker] [bug #52016] conversion to short circuit in if, while but not in until, Rik, 2017/09/14
- [Octave-bug-tracker] [bug #52016] conversion to short circuit in if, while but not in until, John W. Eaton, 2017/09/14
- [Octave-bug-tracker] [bug #52016] '&' or '|' used in until condition should warn about short-circuiting, Rik, 2017/09/14
- [Octave-bug-tracker] [bug #52016] '&' or '|' used in until condition should warn about short-circuiting, Rik, 2017/09/14
- [Octave-bug-tracker] [bug #52016] '&' or '|' used in until condition should warn about short-circuiting, Mike Miller, 2017/09/15
- [Octave-bug-tracker] [bug #52016] '&' or '|' used in until condition should warn about short-circuiting, Rik, 2017/09/15