Re: booleans

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

Kat wrote:

> Ok, i declared
> result = {}
> and with
> result = ""
> and both died at the same place
> if ( length(result) = 0 )
> with the same error:
> variable result has not been assigned a value
>
> ex.err has this:
>  result = <no value>

To point out the obvious: if ex.err says that result hasn't been assigned a
value, then it hasn't been. There are a couple possibilities:

1. The initialization is in a conditional statement that gets bypassed.

2. The execution order isn't what you expect, and you reach the test before
the initialization.

3. You are initializing a local variable and testing a global, or vice
versa. (I'm guessing this is what's happening to you).

I'd stick a trace before the initialization and test, to make sure they were
executing in order. If that doesn't work, reduce the code to a minimum and
post it - I'd love to see it.

-- David Cuny

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

Search



Quick Links

User menu

Not signed in.

Misc Menu