help-octave
[Top][All Lists]
Advanced

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

Re: Evaluation of binary expression


From: Moritz Borgmann
Subject: Re: Evaluation of binary expression
Date: Mon, 7 Apr 2008 20:48:07 +0200

At 11:05 Uhr -0700 2008-04-07, Ben Abbott wrote:
 >The problem obviously is in line 90 of cgs.m (my version of it), which is

if ((nargin >= 5) & ~isempty(M1))

>I tend to say that the evaluation of the second expression of the binary operator `&' should be suppressed in case the evaluation of the first expression did already provide a negative result.

this should be covered by the FAQ:

http://www.gnu.org/software/octave/FAQ.html#MATLAB-compatibility

item 10, search for "short-circuit". This can basically be considered a Matlab bug. IMO, if you change the "&" to a "&&", you should be up & running.

I take this to the octave-help list since it's not really a bug in Octave.

-M


reply via email to

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