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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,39f3c359196fe8b4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-20 08:17:22 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!sccrnsc04.POSTED!not-for-mail From: "Steve" Newsgroups: comp.lang.ada References: Subject: Re: for x'address or variant X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: <4Syoa.543627$F1.76041@sccrnsc04> NNTP-Posting-Host: 12.211.13.75 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc04 1050851840 12.211.13.75 (Sun, 20 Apr 2003 15:17:20 GMT) NNTP-Posting-Date: Sun, 20 Apr 2003 15:17:20 GMT Organization: AT&T Broadband Date: Sun, 20 Apr 2003 15:17:20 GMT Xref: archiver1.google.com comp.lang.ada:36318 Date: 2003-04-20T15:17:20+00:00 List-Id: First: If you're a newbie to Ada, you're taking the wrong approach. If that is the case, please elaborate a little more on the problem you're trying to solve, maybe we can help with a different approach. Second: If you're not a newbie and are showing a small subset of the problem without the gory details, there is a pragma defined for the intent of interfacing with C called "Unchecked_Union" that would allow you to do this. The pragma is not currently (as far as I know) supported by the standard, but is available with Gnat and ObjectAda (maybe more). The Win32Ada bindings have an example of the use of this pragma. Steve (The Duck) "kat-Zygfryd" <6667@wp.pl> wrote in message news:b7u1jh$p6k$1@news.onet.pl... > I have a tiny problem, I want to have a structure: > type P is access X; > type X is record > next: array(1..2) of P; > left: P; > right: P; > end record; > wherein the left component uses next(1)'address > and right component uses next(2)'address, > unfortunately "for x'address use" statements are > not allowed within record declarations, and > variant records don't allow me to access both > next and left/right exchangably. do you know a way > to work this out? > > Zygfryd @gnat3.15 > >