🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #5437

Re: Loops

#5437
From: Ralf.Brown
Date: Fri, 08 Apr 1988 12:18
22 lines
1368 bytes
In article <11047@shemp.CS.UCLA.EDU>, gast@lanai.cs.ucla.edu (David Gast) writes:
}While it is commonly believed that it is impossible to change the
}index variable in a for loop, it is possible to do so.  Consider the
}following program.
}
[code deleted for brevity]
}
}David Gast
}gast@cs.ucla.edu
}{ucbvax,rutgers}!ucla-cs!gast

I don't know about Turbo Pascal 4.0, but versions 1 through 3 use a "hidden"
variable for the loop counter, so you can change the visible loop counter
to your heart's content and the loop will still execute exactly the same
number of times.

--
{harvard,ucbvax}!b.gp.cs.cmu.edu!ralf -=-=- DISCLAIMER? I claimed something?
ARPA: RALF@CS.CMU.EDU  FIDO: Ralf Brown 1:129/31  BIT: RALF%CS.CMU.EDU@CMUCCVMA 
TalkNet: (school) | "Tolerance means excusing the mistakes others make.
(412)268-3053     |  Tact means not noticing them." --Arthur Schnitzler
Technical Details
Message-ID: <225cd329@ralf>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!amdahl!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!bbn!rochester!PT.CS.CMU.EDU!B.GP.CS.CMU.EDU!Ralf.Brown@B.GP.CS.CMU.EDU

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!amdahl!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!bbn!rochester!PT.CS.CMU.EDU!B.GP.CS.CMU.EDU!Ralf.Brown@B.GP.CS.CMU.EDU
From: Ralf.Brown@B.GP.CS.CMU.EDU
Newsgroups: comp.lang.misc,comp.lang.pascal
Subject: Re: Loops
Message-ID: <225cd329@ralf>
Date: 8 Apr 88 12:18:33 GMT
Sender: netnews@PT.CS.CMU.EDU
Lines: 21
Summary: Turbo Pascal uses hidden loop counters for security
In-Reply-To: <11047@shemp.CS.UCLA.EDU>