Re: err.ex

new topic     » goto parent     » topic index » view thread      » older message » newer message

On 10 Jan 2003, at 1:56, Robert Craig wrote:

> 
> Kat writes:
> > What does it mean when i have a variable listed twice, like this:
> >
> >    loop = 3062
> >    loop = 9
> >
> 
> That's a quirky "feature". 
> It happens when you have more than one for-loop 
> in the same routine, or same file, that uses the 
> same loop variable name. Euphoria considers them
> to be different variables, but with the same name.
> 
> > ? How will i know which is correct, if either?
> 
> It's usually pretty easy if you look at the trace back.
> One or both values will probably be the final value
> attained by a for-loop variable. Technically, one or
> both loops will have terminated, so the variable(s)
> don't exist anymore, and you probably don't care 
> what the values are.

Actually, i did, or i wouldn't have been looking for them. It was blowing up in 
a loop, and knowing the value would have told me what (file) line was causing 
it.

I rewrote the block of code to use while and an exit.

Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu