home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / pascal / 4626 < prev    next >
Encoding:
Text File  |  1992-07-30  |  1.4 KB  |  43 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!usc!aero.org!jordan
  3. From: jordan@aero.org (Larry M. Jordan)
  4. Subject: Re: Is this legal - why/why not?
  5. Message-ID: <1992Jul30.184157.9500@aero.org>
  6. Sender: news@aero.org
  7. Organization: The Aerospace Corporation
  8. References: <1992Jul29.201359.4297@nntpd.lkg.dec.com> <Bs6L75.BDK@knot.ccs.queensu.ca> <1992Jul30.174037.6433@nntpd.lkg.dec.com>
  9. Date: Thu, 30 Jul 1992 18:41:57 GMT
  10. Lines: 31
  11.  
  12. In article <1992Jul30.174037.6433@nntpd.lkg.dec.com> reagan@hiyall.enet.dec.com (John R. Reagan) writes:
  13. >
  14. >In article <Bs6L75.BDK@knot.ccs.queensu.ca>, dmurdoch@QueensU.CA (Duncan Murdoch) writes...
  15. >> 
  16. [ stuff deleted ]
  17. >
  18. >Nope, I didn't make a typo.  The Pascal standard doesn't discuss
  19. >"sequential" anything.  The "INTEGER = 1..10" is a defining occurrance
  20. >of the identifier INTEGER for the entire region (the region goes backwards
  21. >to the beginning of the block).  This definition of INTEGER retroactively
  22. >changes the previous use of INTEGER in the definition of FOO.  You now
  23. >have a "use before declare" situation and thats illegal.
  24. >
  25. >Of course, noone claims that Turbo Pascal is standards conforming...
  26. >
  27.  
  28. "Well, why didn't you say so?" (Wizard of Oz).  
  29.  
  30. John, can I do something like the following to get around the above problem:
  31.  
  32.   type
  33.     foo = SYSTEM.integer;
  34.     integer = 1..10;
  35.  
  36. I don't have a copy of the Pascal Standard handy.  Is there a way to
  37. explicitly qualify the  predefined integer type?  
  38.  
  39.  
  40. --Larry %)
  41.  
  42.  
  43.