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: a07f3367d7,73cb216d191f0fef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.68.129.38 with SMTP id nt6mr1597622pbb.8.1363367723348; Fri, 15 Mar 2013 10:15:23 -0700 (PDT) Path: q9ni18391pba.1!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!news-peer1!btnet!zen.net.uk!hamilton.zen.co.uk!xlned.com!feeder1.xlned.com!newsfeed10.multikabel.net!multikabel.net!newsfeed20.multikabel.net!news.mi.ras.ru!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed-00.mathworks.com!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Mon, 11 Mar 2013 16:01:04 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 X-Trace: pcls6.std.com 1363032065 31636 192.74.137.71 (11 Mar 2013 20:01:05 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 11 Mar 2013 20:01:05 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:1BtRuQC9YVGeGF/m0GiFpZQ+PI4= Content-Type: text/plain; charset=us-ascii Date: 2013-03-11T16:01:04-04:00 List-Id: Anh Vo writes: > I have read ARM section 3.2.4, Subtype Predicates, I did not see any > rules prohibiting from using attribute 'Succ as contained in the code > nipet below. I would expect Prime'Succ (3) return 5 for next prime > number. However, 4 is returned instead. Is this a correct behavior? It is standard-conforming behavior. Prime'Succ is the same as Prime'Base'Succ. Many other attributes behave the same way. This has been true since Ada 83. For example, Prime'Succ(1000) = 1001, and does not raise an exception. Positive'Image (-10) = "-10". > subtype Prime is Natural range 1 .. 1000 - Bob