From bug-octave-request at bevo dot che dot wisc dot edu Thu Oct 12 04:26:04 2000 Subject: Odd results from &, |, % functions From: Carsten Rasmussen To: bug-octave at bevo dot che dot wisc dot edu Date: Thu, 12 Oct 2000 11:29:03 +0200 Hello octave-bug I have tried the as follows with octave. --------- /home/carsten> octave GNU Octave, version 2.0.16 (alpha-suse-linux-gnu). Copyright (C) 1996, 1997, 1998, 1999, 2000 John W. Eaton. This is free software with ABSOLUTELY NO WARRANTY. For details, type `warranty'. octave:1> 7 & 4 ans = 1 octave:2> 5 | 3 ans = 1 octave:3> 7 % 4 ans = 7 octave:4 ----------- I expected that & and | operator should work as an bitwise-AND and bitwise-OR (as in C and MATLAB) I would expect. octave:1> 7 & 4 ans = 4 octave:2> 5 | 3 ans = 7 And the remain remain operator % is interpret as a comment(#)? I would expect: octave:3> 7 % 4 ans = 3 Best regards Carsten Rasmussen ---------------------- Silicide a/s Symbion Science Park Vibevej 31, Box 302 DK-2400 Copenhagen NV Denmark (tlf) (+45)70224495 (fax) (+45)70224496 ----------------------- ----------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.che.wisc.edu/octave/octave.html How to fund new projects: http://www.che.wisc.edu/octave/funding.html Subscription information: http://www.che.wisc.edu/octave/archive.html -----------------------------------------------------------------------