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 19:45:47 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn1feed!worldnet.att.net!135.173.83.71!wnfilter1!worldnet-localpost!bgtnsc06-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3B5B9072.2276B559@worldnet.att.net> From: James Rogers X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Strings initialised by literals References: <87elra9kiu.fsf@chiark.greenend.org.uk> <3B5A2478.460CC8B6@worldnet.att.net> <3B5B7E39.79B814F4@avercom.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 23 Jul 2001 02:45:46 GMT NNTP-Posting-Host: 12.86.32.114 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc06-news.ops.worldnet.att.net 995856346 12.86.32.114 (Mon, 23 Jul 2001 02:45:46 GMT) NNTP-Posting-Date: Mon, 23 Jul 2001 02:45:46 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:10438 Date: 2001-07-23T02:45:46+00:00 List-Id: I agree completely. However, the specific question asked about the lower bound for a string literal. This should fall into the no "applicable index constraint" exception you mentioned below. For that reason I said the lower bound will be 1. Jim Rogers Colorado Springs, Colorado USA Tucker Taft wrote: > > 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