HP Forums
[BUG] Logical AND - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: [BUG] Logical AND (/thread-527.html)

Pages: 1 2


RE: [BUG] Logical AND - Joe Horn - 02-02-2014 05:07 AM

(02-01-2014 07:57 PM)patrice Wrote:  3 OR 5 => 1, Boolean as expected
BITOR(3,5) => 7, bitwise as expected
but
#3 OR #5 => #7, bitwise not as expected
BITOR(#3,#5) => #7, bitwise as expected

in order to get OR to act Boolean, one have to resort to:
(#3 <> #0) OR '#5 <> #0)
Here's an undocumented alternative:

or(#3, #5) --> 1

The "or" must be spelled in lowercase letters for it to work that way.