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=2.1 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY,PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,89a10de5b2ea87d7 X-Google-Attributes: gid103376,public From: "Pascal Obry" Subject: Re: generic binary tree in ada 83 Date: 1998/04/29 Message-ID: <6i6idu$2ib$1@cf01.edf.fr>#1/1 X-Deja-AN: 348660591 References: <35461333.6DFB@westcott.force9.co.uk> <6i55q1$nfe@top.mitre.org> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: EDF - Direction des Etudes et Recherches Newsgroups: comp.lang.ada Date: 1998-04-29T00:00:00+00:00 List-Id: 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"