Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!buengc!art From: art@buengc.BU.EDU (A. R. Thompson) Newsgroups: comp.lang.pascal Subject: Re: Control variables in FOR loops Message-ID: <1704@buengc.BU.EDU> Date: 17 Dec 88 20:49:07 GMT References: <17855@adm.BRL.MIL> Reply-To: art@buengc.bu.edu (A. R. Thompson) Followup-To: comp.lang.pascal Organization: Boston Univ. Col. of Eng. Lines: 15 In article <17855@adm.BRL.MIL> spector%BRILLIG.UMD.EDU@cunyvm.cuny.edu (Lee Spector) writes: >[text of program "nonsense" deleted. >(The question is: what SHOULD this do and what DOES it do in implementation > X.) > >I ran this on Berkeley pascal on a big Vax here at U. MD. The compiler did not >complain. I don't like what resulted from the last line in barf. >(the one I marked (****) What it did was to always print 10. >This is not consistent with any rules for access to i that I can formulate. >I thought I understood how loop counters were supposed to work, but now >I'm quite confused and I'd appreciate any clarification anyone can offer. Since the program is not legal Pascal, you really can't predict what it "should" do because you can't appeal to the language definition for guidance. It's an illegal program pure and simple.