From bug-request at octave dot org Wed Sep 8 12:33:45 2004 Subject: Octave bug reports From: "John W. Eaton" To: "bwales at aequilibrium dot com" Cc: "'bug-octave at bevo dot che dot wisc dot edu'" Date: Wed, 8 Sep 2004 13:32:59 -0400 On 8-Sep-2004, Brian wrote: | 2) With the --traditional switch, the single-pipe operator | does not short-circuit while the doublre-pipe || opertaor does | In my version of MATLAB (R12) the single-pipe | short-circuits. Should not Octave emulate MATLAB when | invoked with --traditional ? I don't think this "feature" should be supported, because even in your R12 copy of Matlab, the | operator only short-circuits inside the conditions of IF or WHILE statements. So you can get different results if you write t = f () | g (); if (t) ... vs if (f () | g ()) ... and also in other cases with empty matrices. Later releases of Matlab include mostly Octave-compatible || and && operators. jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------