Path: utzoo!attcan!uunet!mcvax!enea!dkuug!ambush!ambone!leif From: leif@ambone.UUCP (Leif Andrew Rump) Newsgroups: comp.lang.pascal Subject: Re^2: Control variables in FOR loops Message-ID: <449@ambone.UUCP> Date: 18 Jan 89 10:17:38 GMT References: <00056@meph.UUCP> <7822@boring.cwi.nl> Organization: AmbraSoft A/S (Denmark) Lines: 20 dik@cwi.nl (Dik T. Winter) writes: >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 It will ease debugging if the runtime system is able to detect 'NaN'. A lot of computers use two complement meaning (in a 16 bit environment) that the range goes from -32768 to 32767. Use -32768 as 'Nan' and you have a 'normal' range -32767 to 32767... Leif Andrew Rump, AmbraSoft A/S, Roejelskaer 15, DK-2840 Holte (Denmark) UUCP: leif@ambone.dk, phone: +45 2424 111, touch phone: +45 422 817 + 313 > > > Why are tall Irish girls with red hair so wonderful ? ? ? < < <