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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,56525db28240414a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.76.130 with SMTP id k2mr3464275paw.16.1343789444347; Tue, 31 Jul 2012 19:50:44 -0700 (PDT) Path: g9ni9635140pbo.0!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nrc-news.nrc.ca!newsfeed.news.ucla.edu!usenet.stanford.edu!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Keean Schupke Newsgroups: comp.lang.ada Subject: Re: Efficient Sequential Access to Arrays Date: Thu, 26 Jul 2012 05:32:32 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <01983f1c-f842-4b1f-a180-bcef531dad4c@googlegroups.com> <87ipdf4vh6.fsf@mid.deneb.enyo.de> <4ce44d2d-d789-42a0-a6ed-035f7f8d58be@googlegroups.com> NNTP-Posting-Host: 82.44.19.199 Mime-Version: 1.0 X-Trace: posting.google.com 1343305953 30659 127.0.0.1 (26 Jul 2012 12:32:33 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 26 Jul 2012 12:32:33 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=82.44.19.199; posting-account=T5Z2vAoAAAB8ExE3yV3f56dVATtEMNcM User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-07-26T05:32:32-07:00 List-Id: On Thursday, 26 July 2012 11:10:39 UTC+1, Brian Drummond wrote: > On Thu, 26 Jul 2012 01:38:41 -0700, Keean Schupke wrote: > > > This is an equivalent concept to nullable, so two questions: > > > > What is the literal for 'invalid', IE: > > > > X : Index := #INVALID -- we should be able to initialise to invalid. > > > > if X = #INVALID -- I want to be able to test for invalid. > > There's an attribute for that. > > if X'Valid ... > > - Brian So if I do if X'Valid then Y(X) -- if X is the same type as the index of Y then no need to range check. end if If I explicitly check 'Valid, the compiler should be able to omit some implicit range checks, as 'Valid is an explicit range check. Cheers, Keean.