home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!sun-barr!decwrl!deccrl!news.crl.dec.com!news!nntpd.lkg.dec.com!hiyall.enet.dec.com!reagan
- From: reagan@hiyall.enet.dec.com (John R. Reagan)
- Subject: Re: Is this legal - why/why not?
- Message-ID: <1992Jul30.174037.6433@nntpd.lkg.dec.com>
- Sender: usenet@nntpd.lkg.dec.com (USENET News System)
- Organization: Digital Equipment Corporation
- References: <l7b682INNasf@muleshoe.cs.utexas.edu> <1992Jul29.072408.23090@monu6.cc.monash.edu.au> <1992Jul29.201359.4297@nntpd.lkg.dec.com> <Bs6L75.BDK@knot.ccs.queensu.ca>
- Date: Thu, 30 Jul 1992 18:36:43 GMT
- Lines: 25
-
-
- In article <Bs6L75.BDK@knot.ccs.queensu.ca>, dmurdoch@QueensU.CA (Duncan Murdoch) writes...
- >
- >Is that really illegal, or did you make a typo? It compiles just as
- >you'd expect in Turbo Pascal: "foo" becomes the standard 16 bit integer
- >type, "integer" becomes the subrange 1..10. TP processes the declarations
- >strictly sequentially; I had thought standard Pascal did it that way
- >too.
-
- Nope, I didn't make a typo. The Pascal standard doesn't discuss
- "sequential" anything. The "INTEGER = 1..10" is a defining occurrance
- of the identifier INTEGER for the entire region (the region goes backwards
- to the beginning of the block). This definition of INTEGER retroactively
- changes the previous use of INTEGER in the definition of FOO. You now
- have a "use before declare" situation and thats illegal.
-
- Of course, noone claims that Turbo Pascal is standards conforming...
-
- ---
- John Reagan
- Digital Equipment Corporation
- reagan@hiyall.enet.dec.com
- Disclaimer: The opinions and statements expressed by me are not
- necessarily those of Digital Equipment Corporation.
- ---
-