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-Thread: 103376,9901a52b5f698b34 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread3.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.11) Gecko/20050728 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: String Problem References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Thu, 08 Sep 2005 01:14:16 GMT NNTP-Posting-Host: 4.240.72.96 X-Complaints-To: abuse@earthlink.net X-Trace: newsread3.news.pas.earthlink.net 1126142056 4.240.72.96 (Wed, 07 Sep 2005 18:14:16 PDT) NNTP-Posting-Date: Wed, 07 Sep 2005 18:14:16 PDT Xref: g2news1.google.com comp.lang.ada:4514 Date: 2005-09-08T01:14:16+00:00 List-Id: Brian May wrote: > What is a "null string"? ARM 2.6: "A null string literal is a string_literal with no string_elements between the quotation marks." and, from the Examples section: '"" -- a null string literal' ARM 4.2: "The evaluation of a string_literal that is a primary yields an array value containing the value of each character of the sequence of characters of the string_literal, as defined in 2.6. The bounds of this array value are determined according to the rules for positional_array_aggregates (see 4.3.3), except that for a null string literal, the upper bound is the predecessor of the lower bound. "For the evaluation of a string_literal of type T, a check is made that the value of each character of the string_literal belongs to the component subtype of T. For the evaluation of a null string literal, a check is made that its lower bound is greater than the lower bound of the base range of the index type. The exception Constraint_Error is raised if either of these checks fails." ARM A.3.2: " Each of the names To_Lower, To_Upper, and To_Basic refers to two functions: one that converts from Character to Character, and the other that converts from String to String. The result of each Character-to-Character function is described below, in terms of the conversion applied to Item, its formal Character parameter. The result of each String-to-String conversion is obtained by applying to each element of the function's String parameter the corresponding Character-to-Character conversion; the result is the null String if the value of the formal parameter is the null String. The lower bound of the result String is 1." Similar uses of the phrase "null string" may be found in the descriptions of the various Ada.Strings.* packages, and in other places. It does not seem to ever be described. The meaning seems to be a value of type String with 'Length = 0, or a[n] [Un]Bounded_String such that the function Length returns 0. It could also be defined as a string that is equal to "". -- Jeff Carter "I like it when the support group complains that they have insufficient data on mean time to repair bugs in Ada software." Robert I. Eachus 91