Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!hplabs!hpda!hpcuhb!hpcllla!hpclisp!hpcllmr!mark From: mark@hpcllmr.HP.COM (Mark Rozhin) Newsgroups: comp.lang.pascal Subject: Re: Re^2: Control variables in FOR loops Message-ID: <950023@hpcllmr.HP.COM> Date: 9 Feb 89 21:14:20 GMT References: <449@ambone.UUCP> Organization: Hewlett-Packard Calif. Language Lab Lines: 19 >I've had the same problem with INVALID CONTROL VARIABLE using HP >Pascal on the Hp3000 at school. I think it doesn't follow along the >scope rules for standard pascal. If you declare I as local to the >procedure, it works. from the ISO standard: 6.8.3.9 For-statements. "The control variable shall be an entire-variable whose identifier is declared in the variable-declaration-part of the block closest-containing the for-statement." ANSI reads the same (by definition and if you look it up). now if you go back to the second edition user report (by wirth), it omits any restriction. is that what you mean by standard pascal? m