Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!amdahl!dlb!megatest!djones From: djones@megatest.UUCP (Dave Jones) Newsgroups: comp.lang.pascal Subject: Re: Scope question Message-ID: <417@goofy.megatest.UUCP> Date: 30 Mar 88 21:43:11 GMT References: <718@virginia.acc.virginia.edu> Organization: Megatest Corporation, San Jose, Ca Lines: 28 in article <718@virginia.acc.virginia.edu), scl@virginia.acc.virginia.edu (Steve Losen) says: ) ) The following pascal program compiles and outputs "10" with the Berkeley ) pascal compiler "pc". ) ) program test(output); ) const c = 10; ) ) procedure junk; ) const c = c; { Shouldn't this be an error ? } [Yep.] ^ applied occurance ^ defining point ) begin ) writeln(c) ) end; ) ) begin ) junk ) end. ) ) According the the ISO pascal standard: ) Yep. That is an error. It is, as you pointed out, an applied occurance of c is before the defining point. -- Dave J.