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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9f560d8fc43ddc9e,start X-Google-Attributes: gid103376,public From: gressett@iglobal.net Subject: Newbie question about Character range 'A' .. 'Z' Date: 2000/05/16 Message-ID: #1/1 X-Deja-AN: 624094203 Content-Transfer-Encoding: 7bit Organization: Posted via Supernews, http://www.supernews.com Content-Type: text/plain; charset=us-ascii MIME-Version: 1.0 Reply-To: gressett@iglobal.net Newsgroups: comp.lang.ada X-Complaints-To: newsabuse@supernews.com Date: 2000-05-16T00:00:00+00:00 List-Id: I am learning Ada from the book Ada as a Second Language, by Norman H. Cohen. (3rd printing) In chapter 3, starting at the end of page 131 is a sample procedure, Count_Letters, which contains errors which are corrected in the errata page at the web site for the book. The problem it that 'A' .. 'Z' is intended to be a Character range, but is ambiguous because it cannot be distinguished from a Wide_Character range. The errata page states that all occurrences of 'A' .. 'Z' should be replaced with Character range 'A' .. 'Z', even in the line if Next_Char in 'A' .. 'Z' then where the declaration of Next_Char as a Character removes the ambiguity. The errata page suggests that this is for consistency, as the rules of the language do not require an explicit Character range here. The Gnat 3.12p compiler, however, prohibits the Character range, producing the error message "range constraint not allowed in membership test" Is Gnat 3.12p being overly restrictive, or is the erratum wrong?