Path: utzoo!mnetor!uunet!husc6!mailrus!umix!nancy!eecae!super.upenn.edu!dsl.cis.upenn.edu!catone From: catone@dsl.cis.upenn.edu (Tony Catone) Newsgroups: comp.lang.pascal Subject: Re: ISO Pascal scope question Message-ID: <3947@super.upenn.edu> Date: 6 Apr 88 00:54:03 GMT References: <4793@aw.sei.cmu.edu> Sender: news@super.upenn.edu Reply-To: catone@dsl.cis.upenn.edu.UUCP (Tony Catone) Organization: University of Pennsylvania Lines: 35 In article <4793@aw.sei.cmu.edu> firth@sei.cmu.edu (Robert Firth) writes: > >In article <718@virginia.acc.virginia.edu> you write: > >>program test(output); >> const c = 10; >> >>procedure junk; >> const c = c; { Shouldn't this be an error ? } > >Yes, if you accept the ISO definition, this is an error. > .......... >Unfortunately, few Pascal compilers get this right; I won't >speculate about the reasons. > .......... >For your compiler, I believe you should follow the ISO definition, >and do it right.......... Does anyone really believe ISO definitions are right? :-) But seriously, why should the compiler blindly follow the ISO standard when Berkley's behavior seems reasonable and intuitive? People sometimes argue portability in this matter. The few projects I've worked on using "standard" Pascal have as a result been so inefficient as to substantially sabotage their chances for success. Besides, no one forces you to use non- standard features if you don't want to. (Extraneous lines included because of dumb News restrictions) - Tony catone@dsl.cis.upenn.edu catone@wharton.upenn.edu