[Robelle-l] Suprtool and bit math
per.2.ostberg@kus.se
per.2.ostberg@kus.se
Tue, 27 Jul 2004 21:57:33 +0200
greetings,
I'd like to extract records from my dataset if all bits set in the item
ORDERED is also set in the item PERFORMED. The items are I1 (16-bit
integers).
Using "if ordered - performed <> 0" doesn't quite cut it since sometimes
more bits are set in PERFORMED...
In HP-Fortran I'd say something like:
if ((ORDERED .and. PERFORMED) .eq. ORDERED)
but that's because HP-Ftn77 can do bitwise "and" on integers.
Is there a way to do this in suprtool? if not with bit-arithmetic, perhaps
someone less mathematically challenged than I know of a way to do this with
suprtools arithmetic operators "+, -, *, / and mod"?
tia
/per
--------------------------------------------------
Per Ostberg / per.2.ostberg@kus.se
LabMedicin-IT
Karolinska University Hospital, Huddinge
C1 56 / SE-141 86 HUDDINGE
--------------------------------------------------