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: a07f3367d7,56525db28240414a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.105.38 with SMTP id gj6mr756329wib.0.1343789484857; Tue, 31 Jul 2012 19:51:24 -0700 (PDT) Received: by 10.180.24.135 with SMTP id u7mr754636wif.3.1343789484833; Tue, 31 Jul 2012 19:51:24 -0700 (PDT) Path: q11ni15940136wiw.1!nntp.google.com!7no2032598wig.0!news-out.google.com!n2ni19328164win.0!nntp.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!border1.nntp.ams2.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border2.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nrc-news.nrc.ca!goblin1!goblin2!goblin.stu.neva.ru!news.internetdienste.de!news.tu-darmstadt.de!fu-berlin.de!news1.uni-leipzig.de!news.uni-jena.de!news.uni-weimar.de!not-for-mail From: stefan-lucks@see-the.signature Newsgroups: comp.lang.ada Subject: Re: Efficient Sequential Access to Arrays Date: Thu, 26 Jul 2012 21:37:48 +0200 Organization: Bauhaus-Universitaet Weimar Message-ID: References: <01983f1c-f842-4b1f-a180-bcef531dad4c@googlegroups.com> <87ipdf4vh6.fsf@mid.deneb.enyo.de> <4ce44d2d-d789-42a0-a6ed-035f7f8d58be@googlegroups.com> <5011413b$0$9523$9b4e6d93@newsspool1.arcor-online.net> Reply-To: stefan-lucks@see-the.signature NNTP-Posting-Host: medsec1.medien.uni-weimar.de Mime-Version: 1.0 X-Trace: tigger.scc.uni-weimar.de 1343335154 8543 141.54.178.228 (26 Jul 2012 20:39:14 GMT) X-Complaints-To: news@tigger.scc.uni-weimar.de NNTP-Posting-Date: Thu, 26 Jul 2012 20:39:14 +0000 (UTC) X-X-Sender: lucks@medsec1.medien.uni-weimar.de In-Reply-To: <5011413b$0$9523$9b4e6d93@newsspool1.arcor-online.net> Content-Type: TEXT/PLAIN; charset=US-ASCII Date: 2012-07-26T21:37:48+02:00 List-Id: On Thu, 26 Jul 2012, Georg Bauhaus wrote: > On 26.07.12 10:38, Keean Schupke wrote: > > What is the literal for 'invalid', IE: > > > > X : Index := #INVALID -- we should be able to initialise to invalid. > > A good approximation should be > > X : Index := To_Index (Index'Last + 1); > > where To_Index is an instance of Unchecked_Conversion. If To_Index is defined as function To_Index is new Unchecked_Conversion(Integer, Index); this will fail if Index'Last = Integer'Last. Better use pragma Normalize_Scalars -- that cannot surprise you with a Constraint_Error at initialization time. -- ---- Stefan.Lucks (at) uni-weimar.de, University of Weimar, Germany ---- ------ I love the taste of Cryptanalysis in the morning! ------