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.224.39.72 with SMTP id f8mr11571160qae.7.1343789469358; Tue, 31 Jul 2012 19:51:09 -0700 (PDT) Received: by 10.66.88.7 with SMTP id bc7mr1190833pab.2.1343789444522; Tue, 31 Jul 2012 19:50:44 -0700 (PDT) Path: a15ni14729222qag.0!nntp.google.com!h9no1811400pbv.0!news-out.google.com!p10ni7591933pbh.1!nntp.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nrc-news.nrc.ca!goblin2!goblin.stu.neva.ru!news.unit0.net!news.uni-stuttgart.de!news-2.dfn.de!news.dfn.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:21:09 +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> 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 1343334155 6134 141.54.178.228 (26 Jul 2012 20:22:35 GMT) X-Complaints-To: news@tigger.scc.uni-weimar.de NNTP-Posting-Date: Thu, 26 Jul 2012 20:22:35 +0000 (UTC) X-X-Sender: lucks@medsec1.medien.uni-weimar.de In-Reply-To: X-Received-Bytes: 2385 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: 2012-07-26T21:21:09+02:00 List-Id: On Thu, 26 Jul 2012, Keean Schupke wrote: > What is the literal for 'invalid', IE: > > X : Index := #INVALID -- we should be able to initialise to invalid. Of course, you cannot *assign* an invalid value (out of the range of the (sub-)type of X) to X, at least not without Unchecked_Conversion or any other dirty tricks. But you can use pragma Normalize_Scalars to ensure X is set to invalid: . There is also pragma Initialize_Scalars, but I believe it is implementation defined for gnat, not standard Ada. > if X = #INVALID -- I want to be able to test for invalid. As already answered by Brian Drummond, this is "not X.Valid". -- ---- Stefan.Lucks (at) uni-weimar.de, University of Weimar, Germany ---- ------ I love the taste of Cryptanalysis in the morning! ------