comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: Interfacing to C and types visible to Ada
Date: Thu, 03 Jul 2008 14:52:28 +0200
Date: 2008-07-03T14:52:31+02:00	[thread overview]
Message-ID: <486ccb8f$0$6605$9b4e6d93@newsspool2.arcor-online.net> (raw)
In-Reply-To: <ff92d09d-5638-4422-ab11-d214529c0283@l64g2000hse.googlegroups.com>

Maciej Sobczak schrieb:

> just plain "integer", which meaning can depend on how the given
> library is actually used.
> 
> We can use Interfaces.C.int for binding Ada to C, but there is still a
> need to expose somehow the type to regular Ada code. What type should
> be used?

Your description sounds almost like the answer to me.

    type Whatever_Integer is range C.int'First .. C.int'Last;
    --  explain this


> 
> Standard.Integer is the most natural choice, because it clearly
> expresses the "domainless" character of the given type.

Except, as Randy has pointed out, Integer might have a smaller
range than C.int.



  reply	other threads:[~2008-07-03 12:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-03 12:32 Interfacing to C and types visible to Ada Maciej Sobczak
2008-07-03 12:52 ` Georg Bauhaus [this message]
2008-07-03 12:58 ` Ludovic Brenta
2008-07-03 14:33 ` Robert A Duff
2008-07-03 19:19 ` tmoran
2008-07-03 19:35 ` Keith Thompson
2008-07-03 20:35   ` Maciej Sobczak
2008-07-05 20:08     ` Fionn Mac Cumhaill
2008-07-04  4:36 ` Steve
replies disabled

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