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,5e54ec0ce937978 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!out02b.usenetserver.com!news.usenetserver.com!in02.usenetserver.com!news.usenetserver.com!cycny01.gnilink.net!spamkiller.gnilink.net!gnilink.net!trnddc01.POSTED!7c706d3b!not-for-mail From: David Thompson Newsgroups: comp.lang.ada Subject: Re: String literals and wide_string literals - how? Organization: Poor Message-ID: References: <1177063665.093083.241580@e65g2000hsc.googlegroups.com> X-Newsreader: Forte Agent 3.3/32.846 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 21 May 2007 02:33:01 GMT NNTP-Posting-Host: 70.106.86.115 X-Complaints-To: abuse@verizon.net X-Trace: trnddc01 1179714781 70.106.86.115 (Sun, 20 May 2007 22:33:01 EDT) NNTP-Posting-Date: Sun, 20 May 2007 22:33:01 EDT Xref: g2news1.google.com comp.lang.ada:15865 Date: 2007-05-21T02:33:01+00:00 List-Id: On Fri, 20 Apr 2007 16:02:55 -0400, Robert A Duff wrote: > "Randy Brukardt" writes: > OK, it's not weird. It's quite elegant, in fact, from at least one > point of view -- a character type is "just" an enumeration of the > character literals. > > But I'll bet it _seems_ weird to anyone who doesn't know Ada well. Are > there any other languages that have this sort of thing? Many folks > presented with the above will assume type Bit above is a subtype of > Character, or derived from it. That's why I mentioned that > Bit'Size = 1, so the OP would understand that '0' here is not Ascii (or > Latin-1, or whatever) '0'. > Pascal does have CHAR as a system-provided enumerated type. And (normal, nonvarying) STRING as (just) array of char, although it doesn't have the features for all array types that make Ada string types (more) convenient. APL has string as array of char, and a lot of array features which thus also provide string features. When I used it (some time ago) those chars were only 'regular' ones; there was not then much interest in >8b charsets (or really even >6b); don't know if that's changed. PL/1 does have both char and bit strings builtin, with syntactically different literals, and I believe they recently have added wide-chars, but AFAIK not user-defined charsets, and not treated as arrays. - formerly david.thompson1 || achar(64) || worldnet.att.net