Path: utzoo!attcan!uunet!ncrlnk!ncrcae!hubcap!gatech!uflorida!haven!adm!xadmx!garnett%A.CS.OKSTATE.EDU@cunyvm.cuny.edu From: garnett%A.CS.OKSTATE.EDU@cunyvm.cuny.edu (John Garnett) Newsgroups: comp.lang.pascal Subject: Re: Control variables in FOR loops Message-ID: <17851@adm.BRL.MIL> Date: 16 Dec 88 20:08:49 GMT Sender: news@adm.BRL.MIL Lines: 17 From article <1440@csuna.UUCP>, by abcscnuk@csuna.UUCP (Naoto Kimura): > 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." > Isn't it also true that the value of 'i' will be undefined following the termination of the loop contained in procedure 'barf'? If this is the case, then the loop contained in 'ack' should bomb after the first call to 'barf' (assuming the global variable 'i' is allowed as a lcv) John Garnett Computing and Information Sciences Oklahoma State University Email: garnett@a.cs.okstate.edu Stillwater, Oklahoma