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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,edafb2ab7e8839bc X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!m73g2000cwd.googlegroups.com!not-for-mail From: "KE" Newsgroups: comp.lang.ada Subject: Re: Char type verification Date: 15 Nov 2006 15:15:32 -0800 Organization: http://groups.google.com Message-ID: <1163632532.101867.123200@m73g2000cwd.googlegroups.com> References: <1163628033.606530.190550@i42g2000cwa.googlegroups.com> <1163627827.1632.10.camel@localhost.localdomain> NNTP-Posting-Host: 88.240.56.59 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1163632537 24582 127.0.0.1 (15 Nov 2006 23:15:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 15 Nov 2006 23:15:37 +0000 (UTC) In-Reply-To: <1163627827.1632.10.camel@localhost.localdomain> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: m73g2000cwd.googlegroups.com; posting-host=88.240.56.59; posting-account=SU8_Kw0AAABcLlEzcdMhoDhwaHkS8xUq Xref: g2news2.google.com comp.lang.ada:7481 Date: 2006-11-15T15:15:32-08:00 List-Id: Dear George Many thanks for your detailed answer. I'll most certainly make use of your advice. However, if you look again, my question was not - How can I verify whether a character is upper case Nor was it - Where, in the library hierarchies of Ada, can I find the character handling routines It was intended as "How do you translate this example to Ada? How would you, as a presumably experienced Ada coder, do it? What hoops would we jump through? In other words, I wanted to see some Ada idioms in action to create a transparent coding of this. If you believe this simple exercise is not a productive use of your time, though, I can understand. Thanks again. -- KE Georg Bauhaus wrote: [snip...] > > Or use Ada.Characters.Handling.Is_Upper(c), if you want > to include characters outside 7bit ASCII. > > The C type char, which IIRC might start at -127 or > at 0, has an implementation defined representation, > and is a bit vague. The Ada standard frowns upon vague > things, hence Ada's character type does not have > theses issues. OTOH, for interfacing with C, > look at the standard package Interfaces.C. > > For more general uses, there are standard packages > Ada.Strings.Maps, Ada.Strings.Maps.Constants, > Ada.Characters.Handling, and Ada.Characters.Latin_1. > There are all kinds of character predicates and > translation subprograms. > > There are variants for Wide_Character, covering > the BMP of ISO 10646. > > Ada 2005, in addition supports Unicode and related > subprograms.