comp.lang.ada
 help / color / mirror / Atom feed
From: David Thompson <dave.thompson2@verizon.net>
Subject: Re: String literals and wide_string literals - how?
Date: Mon, 21 May 2007 02:33:01 GMT
Date: 2007-05-21T02:33:01+00:00	[thread overview]
Message-ID: <s71253phu0md9cslvmq2573m2uiqmfu7lo@4ax.com> (raw)
In-Reply-To: wccfy6uzuds.fsf@shell01.TheWorld.com

On Fri, 20 Apr 2007 16:02:55 -0400, Robert A Duff
<bobduff@shell01.TheWorld.com> wrote:

> "Randy Brukardt" <randy@rrsoftware.com> writes:
<snip>
> 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



  reply	other threads:[~2007-05-21  2:33 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-20 10:07 String literals and wide_string literals - how? Gerd
2007-04-20 14:33 ` Adam Beneschan
2007-04-20 14:55 ` Robert A Duff
2007-04-20 19:16   ` Randy Brukardt
2007-04-20 20:01     ` Adam Beneschan
2007-04-20 20:41       ` Dmitry A. Kazakov
2007-04-20 20:02     ` Robert A Duff
2007-05-21  2:33       ` David Thompson [this message]
2007-05-22 22:32         ` Randy Brukardt
2007-05-23 18:42           ` Jeffrey R. Carter
     [not found]             ` <f324h5$fna$1@f04n12.cac.psu.edu>
2007-05-24 21:15               ` Jeffrey R. Carter
2007-05-23  2:27         ` Keith Thompson
2007-07-01  1:00           ` David Thompson
2007-05-23 12:28         ` brian.b.mcguinness
2007-04-20 20:48     ` Dmitry A. Kazakov
2007-04-20 22:09   ` Jeffrey R. Carter
2007-04-21  9:41     ` Simon Wright
2007-04-22  0:35       ` Jeffrey R. Carter
2007-04-22  9:45         ` Simon Wright
2007-04-22 20:15           ` Jeffrey R. Carter
2007-04-22 21:18             ` Simon Wright
2007-04-23  1:44               ` Jeffrey R. Carter
2007-04-22  1:00     ` Robert A Duff
2007-04-20 14:58 ` Georg Bauhaus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox