[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about short circuit operators
From: |
CdeMills |
Subject: |
Re: Question about short circuit operators |
Date: |
Fri, 25 Feb 2011 01:17:32 -0800 (PST) |
Michael D. Godfrey wrote:
>
>
> Isn't the point of the short circuit test to deal with side-effects of
> possibly
> untested conditionals? If there are no side-effects, why issue the
> warning? Octave does the right thing, but the warnings do seem
> excessive.
>
No, no. If you explicitly want short circuit test, use the appropriate form
if some_cond && some_other_cond
do_something
endif
(x > 0) || warning('Log(x) will return complex result')
and so on.
Regards
Pascal
--
View this message in context:
http://octave.1599824.n4.nabble.com/Question-about-short-circuit-operators-tp3323547p3324097.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.