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,da3af210412d89fd X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Range types Date: Sun, 21 Oct 2007 20:06:15 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1192994157.867598@athprx04> <471bb318$0$27835$39db0f71@news.song.fi> <471BC497.5060601@gmail.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1193011576 5187 192.74.137.71 (22 Oct 2007 00:06:16 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 22 Oct 2007 00:06:16 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:7ZcCoszW62QvEjdPjIEb+CD2EbI= Xref: g2news2.google.com comp.lang.ada:2536 Date: 2007-10-21T20:06:15-04:00 List-Id: Christos Chryssochoidis writes: > I would like to define a subtype of Wide_Character for a program that > processes (unicode) text. This type would represent the Greek > letters. Greek letters in Unicode, with all their diacritics, are > located in two separate ranges: 0370 - 03D7 and 1F00 - 1FFF. That's a reasonable thing to want, but Ada doesn't support that directly -- you have to program it yourself. >... That's 360 > characters to write in an enumeration... Since gaps are not allowed in > ranges, I 'm thinking instead of defining such a type, to define a > function that would accept a Wide_Character as argument and return a > boolean value indicating whether the given Wide_Character falls in the > ranges of the Greek characters. Right. And perhaps a conversion function that converts from [Wide_?]Wide_Character to Greek_Letter, and raises an exception if it's not a greek letter. - Bob