[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: [Fwd: True/false in KSpread]
From:       Ariya Hidayat <ariya () kde ! org>
Date:       2003-07-01 15:52:50
[Download RAW message or body]


> NOT(vero) -> parse error

This is because the formula parser only understands "true" and "false" 
(mind the case, "True" even won't work) and it's not i18n-ized.

 > NOT(true) = Falso
 > (where Falso = False and vero = true)

This is because the result of formula calculation is boolean type and 
it's i18n-ized. So the result of NOT(true) is False, and it will be 
"False" for English, "Falso" for Italian (and Spanish as well) or <other 
word> in <your favorite language>.

 > Fortunately, NOT(NOT(true)) works, and also NOT(B1) where B1 = "Falso"
 > works. Is this a bug in the program or in our translation?

This is because user input (for integer, boolean, floating-point, or 
string but _not_ formula) is again i18n-ized. When you type "Falso" into 
B1, it will be internally recognized as False boolean input (because 
i18n("False") is "Falso" for Italian).

Conclusion: all these weird things happen because KSpread mixes
i18n stuff between formula parsing and displaying the result.

Solution: implement a new formula engine, which recognizes faily well
both True and true, as well as with support for localized function name.
That's on my TODO, hopefully for future version of KSpread.


-- 
Ariya Hidayat
http://ont.uni-paderborn.de (Research)
ariya@kde.org, http://ariya.pandu.org (Fun)

_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic