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,7b5b3c67aa2a73fe X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news3.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: Easy question about Character manipulation Date: Wed, 31 Jan 2007 18:01:09 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1170100860.762334.13830@l53g2000cwa.googlegroups.com> <1d5n0ksoz75yy.3t2hhxjr35fq$.dlg@40tude.net> <1170106218.6329.63.camel@localhost> <1170121405.6329.89.camel@localhost> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1170284469 5215 192.74.137.71 (31 Jan 2007 23:01:09 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 31 Jan 2007 23:01:09 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:GUVEPVgxlF7sU/4HQqMxHhQmCUc= Xref: g2news2.google.com comp.lang.ada:8793 Date: 2007-01-31T18:01:09-05:00 List-Id: "(see below)" writes: > On 31/1/07 18:11, in article NZ4wh.374843$1i1.113582@attbi_s72, "Jeffrey R. > Carter" wrote: > >> When I learned Pascal (not ISO), my understanding was that >> >> type >> A = 1 .. 3; >> >> was called a subrange, and defined A as what Ada calls a subtype of >> Integer. Well, the original Jensen&Wirth book defining Pascal was so vague that you couldn't really tell what rule was intended about these things. The ISO standard clarified all this stuff. >... Since >> >> B = 1 .. 3; >> >> was another subtype of the same type (in Ada terms), assignment between >> them was no problem. > > That is the practical effect, but it is not what the formal semantics > actually says. And, of course, there is more to type than assignment. The important things are assignment statements, initialization (which Pascal doesn't have in the Ada sense), parameter passing (with or without 'var'), and function return. From what you've explained, all except 'var' parameters behave the way Jeff says above. What's the rationale for treating 'var' specially? As I recall, there's also a special rule in Pascal that you can't pass a component of a packed record or array to a 'var' parameter. Isn't that enough? - Bob