comp.lang.ada
 help / color / mirror / Atom feed
* how to do bit-wise operation on none modular types?
@ 1999-03-03  0:00 bill
  1999-03-03  0:00 ` Tarjei Tj�stheim Jensen
  1999-03-03  0:00 ` Tucker Taft
  0 siblings, 2 replies; 15+ messages in thread
From: bill @ 1999-03-03  0:00 UTC (permalink / raw)



greetings,

I have an integer value that is returned from some call (its status).

I'd like to take the bit-wise "and" of this value against
another value (16#FFFF#). (i.e. in C, do: 0xffff & i)

Ada does not allow this, as both operands must be modular integer types
(i.e. range from 0 to some positive value).

what can one do? do I need to convert integer value returned from signed
to unsigned (i.e. modular)? how?

cheers,
Bill. 




^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~1999-03-05  0:00 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-03  0:00 how to do bit-wise operation on none modular types? bill
1999-03-03  0:00 ` Tarjei Tj�stheim Jensen
1999-03-03  0:00 ` Tucker Taft
1999-03-03  0:00   ` Samuel Mize
1999-03-03  0:00     ` Tucker Taft
1999-03-04  0:00       ` Tom Moran
1999-03-04  0:00         ` fraser
1999-03-04  0:00       ` robert_dewar
1999-03-05  0:00         ` bourguet
1999-03-05  0:00           ` robert_dewar
1999-03-03  0:00     ` dennison
1999-03-03  0:00     ` fraser
1999-03-04  0:00       ` dennison
1999-03-04  0:00       ` Samuel Mize
1999-03-05  0:00         ` fraser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox