comp.lang.ada
 help / color / mirror / Atom feed
From: "kat-Zygfryd" <6667@wp.pl>
Subject: Re: for x'address or variant
Date: Sun, 20 Apr 2003 18:57:36 +0200
Date: 2003-04-20T16:58:03+00:00	[thread overview]
Message-ID: <b7ujir$map$1@news.onet.pl> (raw)
In-Reply-To: b7uhb9$4lb72$1@ID-25716.news.dfncis.de

"Nick Roberts" <nickroberts@blueyonder.co.uk> wrote in message
news:b7uhb9$4lb72$1@ID-25716.news.dfncis.de...
> Declare the following:
>
>     type Node;
>     type Node_Ref is access Node;
>     type Leaf_Direction is (Left, Right);
>     type Leaf_Pair is array (Leaf_Direction) of Node_Ref;
>     type Node is
>         record
>             Payload: ...;
>             Leaves: Leaf_Pair;
>         end record;
>
> Now you can reference, for example, the left leaf an object X1 of type
Node
> by:
>
>     X1.Leaves(Left).all
>
> You can cycle through all the leaves of X1 by:
>
>     for L in Leaf_Direction loop
>         ... X1.Leaves(L).all ...
>     end loop;
>
> I hope this solves the problem. Say if it doesn't.
>
> --
> Nick Roberts
> Jabber: debater@charente.de [ICQ: 159718630]

of course it does, but I wanted it to be done
a little more good-looking, thanks anyway.

Zygfryd





  reply	other threads:[~2003-04-20 16:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-20 11:50 for x'address or variant kat-Zygfryd
2003-04-20 14:05 ` James S. Rogers
2003-04-20 15:17 ` Steve
2003-04-20 16:19 ` Nick Roberts
2003-04-20 16:57   ` kat-Zygfryd [this message]
2003-04-20 16:17     ` Simon Wright
2003-04-20 18:07       ` kat-Zygfryd
2003-04-20 19:39         ` Robert A Duff
2003-04-20 21:17           ` kat-Zygfryd
2003-04-21  2:25             ` John R. Strohm
2003-04-21 10:26               ` kat-Zygfryd
2003-04-21 12:59                 ` Robert A Duff
2003-04-21 16:29                   ` kat-Zygfryd
2003-04-21 17:25                     ` tmoran
2003-04-21 19:48                     ` Robert A Duff
2003-04-21 20:12                       ` kat-Zygfryd
2003-04-21 20:55                         ` Robert A Duff
2003-04-22 12:02                         ` John R. Strohm
replies disabled

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