* Logical arithmetic on integer operands
@ 1986-06-14 3:57 Joe Orost
0 siblings, 0 replies; only message in thread
From: Joe Orost @ 1986-06-14 3:57 UTC (permalink / raw)
<>
A while ago, someone requested a portable package to perform logical
operations on integer operands. The following portable public-domain
package has been sent to the Ada Repository on SIMTEL20:
package logical is
-- return arg rotated count bits.
-- If count < 0, rotate is to the right,
-- else, rotate is to the left.
function rotate(arg, count : integer) return integer;
-- return arg logically shifted count bits.
-- bits shifted out either end are lost
-- If count < 0, shift is to the right,
-- else, shift is to the left
function shift(arg, count : integer) return integer;
-- return left XOR right
function "xor"(left, right : integer) return integer;
--return left AND right
function "and"(left, right : integer) return integer;
--return left OR right
function "or" (left, right : integer) return integer;
--return NOT right
function "not"(right : integer) return integer;
end logical;
regards,
joe
--
Full-Name: Joseph M. Orost
UUCP: ihnp4!vax135!petsd!joe
ARPA: vax135!petsd!joe@BERKELEY
Phone: (201) 758-7284
Location: 40 19'49" N / 74 04'37" W
US Mail: MS 313; Concurrent Computer Corporation; 106 Apple St
Tinton Falls, NJ 07724
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1986-06-14 3:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1986-06-14 3:57 Logical arithmetic on integer operands Joe Orost
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox