From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e08ffaff681705c X-Google-Attributes: gid103376,public From: guerby@gnat.com (Laurent Guerby) Subject: Re: access aliased obstacle Date: 1996/07/06 Message-ID: #1/1 X-Deja-AN: 164128088 sender: guerby@schonberg.cs.nyu.edu references: <4rfig3$l5d@news1.delphi.com> organization: New York University reply-to: guerby@gnat.com newsgroups: comp.lang.ada Date: 1996-07-06T00:00:00+00:00 List-Id: > 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 , Team Ada. "Use the Source, Luke. The Source will be with you, always (GPL)."