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-Thread: 103376,8e7ac81a215f128c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news4.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Using Red-Black Trees Date: Thu, 18 Nov 2010 07:27:20 +0100 Organization: Adalog Message-ID: References: <2419e829-6f45-4075-9005-b9876beb8aaa@r6g2000vbf.googlegroups.com> <46306fd9-21dc-40df-88e7-fc7e568399a4@k11g2000vbf.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 18 Nov 2010 06:27:27 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="z/xN1DBP8RUb+r9ug/i0hg"; logging-data="519"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/04VFZ2xf4ZsH7tSJbX+dz" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 In-Reply-To: Cancel-Lock: sha1:QmasOdPChULfEhQq4fQK75YA1fQ= Xref: g2news2.google.com comp.lang.ada:16541 Date: 2010-11-18T07:27:20+01:00 List-Id: Le 18/11/2010 00:39, Yannick Duchêne (Hibou57) a écrit : > You can have only one at a time. If you select an implementation, you > select it system-wide, and you cannot select one for that usage and > another for another usage in the same system. > If that's really what you want, there is an easy solution. Provide two packages with identical (or compatible enough for your purpose) specifications: package Binary_Tree is.... package Linked_List is.... Then declare at library level: with Binary_Tree; package My_Structure renames Binary_Tree; And then, use My_Structure all over the place. By changing two words in one two-line file, you can switch your entire project to the other implementation. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Adalog a déménagé / Adalog has moved: 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00