
July 3rd, 2008, 08:20 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
Interfacing to C and types visible to Ada
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.
|