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.180.89.133 with SMTP id bo5mr512109wib.6.1363252472489; Thu, 14 Mar 2013 02:14:32 -0700 (PDT) Path: g1ni65098wig.0!nntp.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!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 10:16:05 +0100 Organization: cbb software GmbH Message-ID: <1h0o5cm5cjvoc$.1btj5nd38hlan$.dlg@40tude.net> 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> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2013-03-14T10:16:05+01:00 List-Id: On Wed, 13 Mar 2013 21:28:03 +0000, Simon Wright wrote: > "Dmitry A. Kazakov" writes: > >> On Wed, 13 Mar 2013 19:54:22 +0000, Simon Wright wrote: >> >>> "Dmitry A. Kazakov" writes: >>> >>>> On Wed, 13 Mar 2013 17:45:56 +0000, Simon Wright wrote: >>>> >>>>> I don't remember ever using 'Pred/'Succ, >>>> >>>> Even in: >>>> >>>> generic >>>> type Discrete is (<>); >>>> package Foo is >>> >>> Nope. >>> >>> Out of over 200 packages I have only one with this construct: it is a >>> signature package, no need for 'Pred or 'Succ (in other words, the >>> enumeration defines a set of distinct possibilities, ordering >>> irrelevant). >> >> 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 ... -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de