[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A double negative
From: |
Vic Norton |
Subject: |
A double negative |
Date: |
Fri, 26 Mar 2004 09:01:20 -0500 |
I was going crazy last night trying to debug an octave routine. I
finally found the problem. I had assumed that, if A is false, then ~A
is must be true. My assumption turned out to be false in octave.
Example:
A = [];
if A
printf ("A is true\n");
else
printf ("A is false\n");
endif
if ~A
printf ("~A is true\n");
else
printf ("~A is false\n");
endif
Regards,
Vic
-------------------------------------------------------------
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
-------------------------------------------------------------
- A double negative,
Vic Norton <=