From: "Pascal Obry" <pascal.obry@der.edfgdf.fr>
Subject: Re: generic binary tree in ada 83
Date: 1998/04/29
Date: 1998-04-29T00:00:00+00:00 [thread overview]
Message-ID: <6i6idu$2ib$1@cf01.edf.fr> (raw)
In-Reply-To: 6i55q1$nfe@top.mitre.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1888 bytes --]
Michael F Brenner a �crit dans le message <6i55q1$nfe@top.mitre.org>...
> > I have it working on a single character, but cannot get
> > it to work on generic data.
>
>Just add the following lines on top of your package that implements
>the Tree data structure on type character:
>
> generic
> type character is private;
>
>and it will work on generic data. To instantiate it, use the following
>code:
> package tree_of_limbs is new character_tree (character => limbs);
>
>Then it will work on TYPE LIMBS exactly as it worked on type character.
>
>The operational thing here, is that you already have it working on
>a single character. If you did not, then you could not re-use the
>code, since the code does not work. But since you have the code
>working on one type, it is often trivial to re-use it on other types
>in the Ada programming lanaguage.
>
I'am not really sure this solution will work. How do you know that Karen did
not
make use of the fact that the binary tree contain character ?
Also the use of the predefined type Character here is not elegant at all !
Pascal.
--
--|------------------------------------------------------------
--| Pascal Obry Team-Ada Member |
--| |
--| EDF-DER-IPN-SID- Ing�nierie des Syst�mes d'Informations |
--| |
--| Bureau G1-010 e-mail: pascal.obry@der.edfgdf.fr |
--| 1 Av G�n�ral de Gaulle voice : +33-1-47.65.50.91 |
--| 92141 Clamart CEDEX fax : +33-1-47.65.50.07 |
--| FRANCE |
--|------------------------------------------------------------
--|
--| http://ourworld.compuserve.com/homepages/pascal_obry
--|
--| "The best way to travel is by means of imagination"
prev parent reply other threads:[~1998-04-29 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-04-28 0:00 generic binary tree in ada 83 karen westcott
1998-04-28 0:00 ` Matthew Heaney
1998-04-28 0:00 ` Michael F Brenner
1998-04-28 0:00 ` Robert Dewar
1998-04-29 0:00 ` Pascal Obry [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox