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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ef8134bf67e8207f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-22 18:29:28 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!cambridge1-snf1.gtei.net!news.gtei.net!inmet!not-for-mail From: Tucker Taft Newsgroups: comp.lang.ada Subject: Re: Strings initialised by literals Date: Sun, 22 Jul 2001 21:30:32 -0400 Organization: AverStar Message-ID: <3B5B7E39.79B814F4@avercom.net> References: <87elra9kiu.fsf@chiark.greenend.org.uk> <3B5A2478.460CC8B6@worldnet.att.net> NNTP-Posting-Host: 209.6.249.6 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="4D4F5353" Content-Transfer-Encoding: 7bit X-Trace: inmet2.burl.averstar.com 995851766 8690 209.6.249.6 (23 Jul 2001 01:29:26 GMT) X-Complaints-To: usenet@inmet2.burl.averstar.com NNTP-Posting-Date: 23 Jul 2001 01:29:26 GMT X-Mailer: Mozilla 4.75C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; U; PPC) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:10434 Date: 2001-07-23T01:29:26+00:00 List-Id: James Rogers wrote: > This is guaranteed by the language. > > The string type is defined as : > > type string is array(Positive range <>) of character; Not all strings start at 1. However, when there is no "applicable index constraint" provide by context, then the low bound is the lower bound of the index subtype, which in this case is Positive (and Positive'First = 1). See RM95 4.3(26). > Jim Rogers > Colorado Springs, Colorado > > Matthew Woodcraft wrote: > > > > I've a feeling this question came across this newsgroup recently, but > > I've been unable to find the thread. > > > > If I write > > > > Sample : String := "example"; > > > > Gnat tells me that Sample'First is 1. Is this guaranteed by the > > langauge, or does the compiler choose? > > > > -M- -Tucker Taft stt@avercom.net