home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!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: <1992Jul29.201359.4297@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>
- Date: Wed, 29 Jul 1992 21:09:55 GMT
- Lines: 46
-
-
- In article <1992Jul29.072408.23090@monu6.cc.monash.edu.au>, ins894r@aurora.cc.monash.edu.au (Aaron Wigley [Wigs]) writes...
- >sirosh@cs.utexas.edu (Joseph Sirosh) writes:
- >: I have two questions.
- >:
- >: 1. The following declaration for an enumerated type is legal.
- >: Type Used = (Integer, Char, Boolean);
- >:
- >: even though Integer, Char, Boolean etc. are names of predefined types.
- >: This works on Think Pascal on the Mac.
- >
- 1)
-
- type used = (integer,char,boolean);
-
- is legal
-
- 2)
-
- type used = (integer)
-
- is legal
-
- 3)
-
- type bigone = array [integer] of integer;
-
- is legal.
-
- There must be bugs in the compilers you use. There is nothing
- wrong with redefining predeclared identifiers. They aren't special
- in this regard. You just can't use the same identifier for two
- things in the same scope. For example,
-
- type foo = integer;
- integer = 1..10;
-
- is illegal since integer was used for 2 things in the same scope.
-
- ---
- 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.
- ---
-