Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!haven!adm!xadmx!abcscnuk%CSUNA.UUCP%CUNYVM.CUNY.EDU@cunyvm.cuny.edu From: abcscnuk%CSUNA.UUCP%CUNYVM.CUNY.EDU@cunyvm.cuny.ed (Naoto Kimura) Newsgroups: comp.lang.pascal Subject: Re: Control variables in FOR loops Message-ID: <17925@adm.BRL.MIL> Date: 21 Dec 88 05:10:43 GMT Sender: news@adm.BRL.MIL Lines: 37 I have only found one compiler that handles the program I gave in my previous message correctly. It is the pascal compiler (vers 4) found on the CDC Cyber 750 here at CSUN. The compiler should give the error message "Control variable must be local." //-n-\\ Naoto Kimura _____---=======---_____ (csun!csuna!abcscnuk) ====____\ /.. ..\ /____==== // ---\__O__/--- \\ Enterprise... Surrender or we'll \_\ /_/ send back your *&^$% tribbles !! P.S.: For the benifit of those who missed my last posting... program nonsense(input,output); var i : integer; procedure barf; begin for i := 1 to 10 do write(i:3); write(' i=',i) end; procedure ack; begin for i := 1 to 10 do begin write('i=',i:2,' '); barf; writeln('i=',i:2) end end; begin for i := 1 to 10 do ack end.