From: kst@thomsoft.com (Keith Thompson)
Subject: Re: C++ to Ada95, help please
Date: Sat, 25 Mar 1995 10:02:01 GMT
Date: 1995-03-25T10:02:01+00:00 [thread overview]
Message-ID: <D5zqJD.5Gp@thomsoft.com> (raw)
In-Reply-To: VLADIMIR.95Mar24010728@speedy.intrepid.com
In <VLADIMIR.95Mar24010728@speedy.intrepid.com> vladimir@speedy.intrepid.com (Vladimir Vukicevic) writes:
> Of course, a representation clause for the record is needed above, as
> there are no guarantees that the Ada compiler will arrange this record
> in memory to correspond to the C struct/union. Something like the following
> is needed:
>
> for struct_STRUCT_NAME use
> record
> item1 at 0 range 0 .. 7;
> u_item1 at 1 range 0 .. 7;
> u_item2 at 1 range 0 .. 7;
> item2 at 2 range 0 ..7;
> end record;
In Ada 95, you can just use
pragma Convention(C, struct_STRUCT_NAME);
--
Keith Thompson (The_Other_Keith) kst@thomsoft.com (kst@alsys.com still works)
TeleSoft^H^H^H^H^H^H^H^H Alsys^H^H^H^H^H Thomson Software Products
10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2718
That's Keith Thompson *with* a 'p', Thomson Software Products *without* a 'p'.
next prev parent reply other threads:[~1995-03-25 10:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-03-20 8:06 C++ to Ada95, help please Simon Johnston
1995-03-21 23:27 ` Kevin F. Quinn
1995-03-22 5:07 ` Vladimir Vukicevic
1995-03-22 1:22 ` Tucker Taft
1995-03-22 11:38 ` Robb Nebbe
1995-03-23 12:28 ` Mike Meier
1995-03-23 18:31 ` Tucker Taft
1995-03-24 21:24 ` Robert Dewar
1995-03-27 14:58 ` Norman H. Cohen
1995-03-23 13:30 ` Robert Dewar
1995-03-23 18:01 ` Stephen A. Leake
1995-03-24 9:07 ` Vladimir Vukicevic
1995-03-25 10:02 ` Keith Thompson [this message]
-- strict thread matches above, loose matches on Subject: below --
1995-03-08 7:54 Simon Johnston
1995-03-08 13:56 ` Robert A Duff
1995-03-09 21:23 ` Tucker Taft
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox