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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.24.41 with SMTP id r9mr12921162obf.25.1459029068252; Sat, 26 Mar 2016 14:51:08 -0700 (PDT) X-Received: by 10.157.26.10 with SMTP id a10mr153946ote.20.1459029068186; Sat, 26 Mar 2016 14:51:08 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!nt3no4861272igb.0!news-out.google.com!u9ni4892igk.0!nntp.google.com!nt3no4861267igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 26 Mar 2016 14:51:07 -0700 (PDT) In-Reply-To: <72436e28-13a7-4580-9503-0bd7111f4bab@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:191:8201:bb5a:5985:2c17:9409:aa9c; posting-account=fdRd8woAAADTIlxCu9FgvDrUK4wPzvy3 NNTP-Posting-Host: 2601:191:8201:bb5a:5985:2c17:9409:aa9c References: <72436e28-13a7-4580-9503-0bd7111f4bab@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <060566e9-c555-4eee-a40d-8ed338643d9e@googlegroups.com> Subject: Re: Playing cards. From: rieachus@comcast.net Injection-Date: Sat, 26 Mar 2016 21:51:08 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:29903 Date: 2016-03-26T14:51:07-07:00 List-Id: > Is there a reason why not to use (Natural range <>)? It seems like a simple question, but digging through my mind, I dug out why= . I have plans for this type, and all my plans involve indexes from 1 to n. = Someone else may have different plans, but that is their choice. In my cas= e though, I expect to do lots of arithmetic to arrive at the correct index.= Is it possible that some intermediate will have a zero or negative value?= Sure. Should an Ada compiler try to do that gotcha range check? No. Bu= t if at some point there is a parameter or function return that should not = be range checked, this works. More, this tells the user of the package that any range checking will be bo= unds checking for a particular object.