Re: booleans

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

OK Kat,

try this; new file, on it's own.

-----<start>-------
sequence s
s=""
?s
?length(s)
-------<end>----------

outputs:

{}
0



As you can see, the s="" line _does_ initialize
the sequence, therefore there _must_ be an error 
somewhere in your code. Unless this is a version 
specific bug (I use 2.1) but I would be very
surprised if that section of the interpreter
has been touched in the last few releases.


Here's what I'd be looking for.

Do you have, perhaps two vars, one called "Result"
and one called "result"

Do you have a local called "result" that you are,
initializing and a private also called "result" that
you are not? (or vice versa)

Is the result="" DEFINATELY being executed?
try putting this immediately berfore the line:

if message_box("Initializing result","Debug",0) then end if
(or under DOS)
puts(1,"\n\nINITIALIZING result") if wait_key() then end if

Then you will be SURE the line is executed as the program 
will halt and display a message.

BTW: (result="") will always fail as logic tests must 
equate to an integer. Sequences can be compared using the '='
operator but they must be the same length ("MAN"="CAN") 
equates to {0,1,1} 


Graeme

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

Search



Quick Links

User menu

Not signed in.

Misc Menu