comp.lang.ada
 help / color / mirror / Atom feed
From: gisle@spurv.ii.uib.no (Gisle S�lensminde)
Subject: Re: Or
Date: 2000/01/31
Date: 2000-01-31T00:00:00+00:00	[thread overview]
Message-ID: <slrn89bo9p.5qm.gisle@spurv.ii.uib.no> (raw)
In-Reply-To: vhioga2t8wa.fsf@ljod.ifi.uio.no

In article <vhioga2t8wa.fsf@ljod.ifi.uio.no>, Jan Kroken wrote:
>
>I need bitwise or on Interfaces.C.Int. I couldn't find any
>direct or operator in Ada, so I wrote the following:

<lot of code removed>

The bitwise logical operators is defined in Ada for modular types,
so you don't need C here. Here is an example:

procedure Kroken is

   type Modular is mod 2**32;

   A, B, C : Modular;

begin
   A := 16#00FF#;
   B := 16#FF00#;
   C := A or B;

end; 

If your purpose is interfacing with C, the types unsigned, 
unsigned_short and unsigned_long is defined in interfaces.c

--
Gisle S�lensminde ( gisle@ii.uib.no )   

ln -s /dev/null ~/.netscape/cookies




  parent reply	other threads:[~2000-01-31  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <vhioga2t8wa.fsf@ljod.ifi.uio.no>
2000-01-31  0:00 ` Or tmoran
2000-01-31  0:00 ` Or Vladimir Olensky
2000-01-31  0:00 ` Gisle S�lensminde [this message]
2000-01-31  0:00 ` Or Mark A Biggar
2000-01-31  0:00 ` Or David Starner
replies disabled

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