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,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!cyclone1.gnilink.net!spamkiller.gnilink.net!gnilink.net!trnddc04.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: Sun, 01 Jul 2007 01:00:13 GMT NNTP-Posting-Host: 70.106.87.212 X-Complaints-To: abuse@verizon.net X-Trace: trnddc04 1183251613 70.106.87.212 (Sat, 30 Jun 2007 21:00:13 EDT) NNTP-Posting-Date: Sat, 30 Jun 2007 21:00:13 EDT Xref: g2news1.google.com comp.lang.ada:16366 X-Original-Bytes: 2474 Date: 2007-07-01T01:00:13+00:00 List-Id: On Tue, 22 May 2007 19:27:59 -0700, Keith Thompson wrote: > David Thompson writes: > > 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. > [...] > > It's been a while, but as I recall Pascal's CHAR type isn't considered > to be an enumerated type, though it is a scalar type. And a I checked and you're right, it's not officially enumerated; it is however an 'ordinal' type, along with integer boolean and enums, and you can (and must) SUCC() PRED() and ORD() it. > user-defined enumerated type can't have character literals as > constants, only identifiers. Right. It behaves in what I consider an enumeration-like way, but is privileged in having character-literal values which user enumeration types cannot. Of course this is also true in most other languages that have specific character types: in FORTRAN or COBOL or PL/I 'X' has character type and you can't treat it as a number at all, although in the latter two you can get '1' or '123' to be the number _represented_ thereby, not the character code. Only in the C family (which I count as including Java) is 'X' really a character code. - formerly david.thompson1 || achar(64) || worldnet.att.net