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-Thread: 103376,73cb216d191f0fef X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.68.136.104 with SMTP id pz8mr1804164pbb.3.1363280760315; Thu, 14 Mar 2013 10:06:00 -0700 (PDT) Path: q9ni15678pba.1!nntp.google.com!npeer02.iad.highwinds-media.com!feed-me.highwinds-media.com!cyclone02.ams2.highwinds-media.com!news.highwinds-media.com!voer-me.highwinds-media.com!eweka.nl!lightspeed.eweka.nl!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Thu, 14 Mar 2013 18:05:51 +0100 Organization: cbb software GmbH Message-ID: References: <8klywqh2pf$.1f949flc1xeia.dlg@40tude.net> <513f6e2f$0$6572$9b4e6d93@newsspool3.arcor-online.net> <513faaf7$0$6626$9b4e6d93@newsspool2.arcor-online.net> <51408e81$0$6577$9b4e6d93@newsspool3.arcor-online.net> <11rcs3gg4taww$.bylek8fsshyz$.dlg@40tude.net> <72lrnwimkypq.k20q71qpxioc$.dlg@40tude.net> <1h0o5cm5cjvoc$.1btj5nd38hlan$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: pQ928Up2OZ3uIq9RKW9GMg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 X-Received-Bytes: 2886 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2013-03-14T18:05:51+01:00 List-Id: On Thu, 14 Mar 2013 16:42:24 +0000, Simon Wright wrote: > "Dmitry A. Kazakov" writes: > >> On Wed, 13 Mar 2013 21:28:03 +0000, Simon Wright wrote: >> >>> "Dmitry A. Kazakov" writes: >>> >>>> You need (<>) as an ancestor of both mod <> and range <> in packages >>>> that should be instantiated with either integer or modular type. >>> >>> I don't understand this. >> >> Let you have a generic package you wanted to be able o instantiate with >> either Unsigned_16 or Integer. The formal generic type for that is formal >> discrete. E.g. >> >> generic >> type Index_Type is (<>); >> type Element_Type is private; >> package Generic_Array is ... > > Oh. When you used the word 'ancestor' I thought you were talking about > inheritance or type derivation. That is same. Generic formal types form a class. The class (<>) includes both the class range <> and the class mod <>. In this sense is it an ancestor similarly how a tagged parent type or a base type is for a derived type. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de