comp.lang.ada
 help / color / mirror / Atom feed
From: guerby@gnat.com (Laurent Guerby)
Subject: Re: access aliased obstacle
Date: 1996/07/06
Date: 1996-07-06T00:00:00+00:00	[thread overview]
Message-ID: <ws9d928rekk.fsf@schonberg.cs.nyu.edu> (raw)
In-Reply-To: 4rfig3$l5d@news1.delphi.com


> To pass a data structure to an OS routine I tried
> 
>   type elements(discriminant: enumeration_type:=normal_value) is record
>     case discriminant is
>     ...
>   end record;
>   for elements'size use 64;  -- size does not vary
> 
>   type list_of_elements is array(1 .. 17) of aliased elements;
[...]

   Are you trying to interface a C union (array of)? If it's the case,
I think the use of Unchecked_Union may be of interest (and I believe
it will be portable between Ada 95 implementation).

   An array of general access may also be closer to C here.

-- 
Laurent Guerby <guerby@gnat.com>, Team Ada.
   "Use the Source, Luke. The Source will be with you, always (GPL)."




  parent reply	other threads:[~1996-07-06  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-04  0:00 access aliased obstacle tmoran
1996-07-04  0:00 ` Robert Dewar
1996-07-06  0:00 ` Laurent Guerby [this message]
1996-07-07  0:00 ` Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
1996-07-09  0:00 tmoran
1996-07-09  0:00 ` Robert Dewar
1996-07-09  0:00 ` Laurent Guerby
1996-07-09  0:00   ` Robert Dewar
1996-07-10  0:00     ` Robert A Duff
1996-07-09  0:00 ` Laurent Guerby
1996-07-09  0:00   ` Robert Dewar
replies disabled

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