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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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 07:05:49 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!feed2.news.rcn.net!rcn!wn14feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!not-for-mail Reply-To: "James S. Rogers" From: "James S. Rogers" 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: <0Pxoa.69950$ja4.4649479@bgtnsc05-news.ops.worldnet.att.net> Date: Sun, 20 Apr 2003 14:05:48 GMT NNTP-Posting-Host: 12.86.39.245 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1050847548 12.86.39.245 (Sun, 20 Apr 2003 14:05:48 GMT) NNTP-Posting-Date: Sun, 20 Apr 2003 14:05:48 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:36316 Date: 2003-04-20T14:05:48+00:00 List-Id: "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? You want a record that holds two values. The problem is that you want each value aliased by two fields. My first question is "why". If next(1) will always be the same as left, and next(2) will always be the same as right, then what do you gain by having two names for the same value in a single record? What are you trying to achieve? I do not see how your intended design is any better than type P is access X; type X is record left : P; right : P; end record; Of course, this simple design also reveals that X is a node of a doubly linked list of nothing. In other words, the node contains no data except its position in a list. Such a data structure is generally useless. Jim Rogers