Re: booleans

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

On 5 Feb 2001, at 1:09, Igor Kachan wrote:

> Dear Kat:
> 
> > No, because length() gives the same error,
> > result has no value!
> 
> Try please:
> 
> ---------
> sequence s
> s={}
> ? length(s)
> 
> sequence t
> t=""
> ? length(t)
> ---------

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>

Changing result from a sequence to an object didn't help. 

Neither did
if ( result = "" ) then <-- same error
neither did:
if equal(result,"") then <-- same error
neither did:
if compare(result,"") then <-- same error
neither did:
if match(result,"") then <-- same error

I even checked ex.err trace to verify i had saved the new lines after editing
them, to
make sure i was running the code i thought i was!

Robert, how do i do this?

result = "" -- only so the &= operator will work getlost
-- misc code that doesn't change result in this pass
--now how to tell if result is still "" or not?

Kat,
wringing her paws,
recoding with:
result = "-1" -- cause it will never be this, i hope
-- code modified to not use the &= , 
-- but instead to replace result if "-1"
-- and &= if not "-1"
-- then check if result = "-1"

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

Search



Quick Links

User menu

Not signed in.

Misc Menu