Path: utzoo!attcan!uunet!mcvax!dik From: dik@cwi.nl (Dik T. Winter) Newsgroups: comp.lang.pascal Subject: Re: Control variables in FOR loops Message-ID: <7822@boring.cwi.nl> Date: 12 Jan 89 23:20:23 GMT References: <00056@meph.UUCP> Organization: CWI, Amsterdam Lines: 17 In article <00056@meph.UUCP> gsarff@meph.UUCP (Gary Sarff) writes: > In article <4267@okstate.UUCP> garnett@a.cs.okstate.edu (John Garnett) > >Isn't it also true that the value of 'i' will be undefined following the > >termination of the loop contained in procedure 'barf'? > > Depends on how the compiler makes 'i' undefined, if there is some way to > put a NaN (not a number) in i for example. But a compiler is not required to take action to make 'i' undefined. Undefined is just that: the standard does not predict the value present in 'i' after termination of the loop. It may be the value before start of the loop; the last value assigned; the same plus 1; NaN; 24723; or whatever you fancy. -- dik t. winter, cwi, amsterdam, nederland INTERNET : dik@cwi.nl BITNET/EARN: dik@mcvax