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,73cb216d191f0fef X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.68.132.73 with SMTP id os9mr13053386pbb.4.1363208971172; Wed, 13 Mar 2013 14:09:31 -0700 (PDT) MIME-Version: 1.0 Path: q9ni15170pba.1!nntp.google.com!news.glorb.com!feeder.erje.net!us.feeder.erje.net!137.226.231.214.MISMATCH!newsfeed.fsmpi.rwth-aachen.de!nuzba.szn.dk!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Wed, 13 Mar 2013 16:09:24 -0500 Organization: Jacob Sparre Andersen Research & Innovation 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> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1363208967 14377 69.95.181.76 (13 Mar 2013 21:09:27 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 13 Mar 2013 21:09:27 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2013-03-13T16:09:24-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:11rcs3gg4taww$.bylek8fsshyz$.dlg@40tude.net... > 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 > > ? I'm not Simon, but in generics I've only used loops on discrete types (the usual reason for such a type being to index an array). In almost all other cases, I've ended up taking 'Pos on them because real math was needed (masking, usually). The not-defined procedure 'Succ would have been much more useful because it could replace expressions like: := + 1; with 'Succ; which would eliminate the potential for errors, possibly generate better code (by not having to evaluate twice if it contains function calls), and eliminate the hair-brained calls for ":=+" operators (which don't even work for Ada). Randy.