Subject | Re: [firebird-support] What about: New Buil-in function Bool() or Boolean() or BoolCast() |
---|---|
Author | eMeL |
Post date | 2007-08-06T15:21:57Z |
> > And, as a portuguese speaker, i could argue that in my language 'S'...But...
> > and 'N' are equivalente to 'Y' and 'N', and anyone could ask to put
> > their native language letters inside this function, and what would
> > happen with a language where the word YES starts with the letter 'N'?
>
> You can always use smallint and 0,1
if you make an offhand report, your user dont know 0 and 1 against
natural language characters ;)
You can write wrong code with integer boolean too [semantical error!]:
(SmallIntBool <> 0) --> (SmallIntBool <> 10) or (SmallIntBool <> 354)
BoolCast() is a better way to convert semantical problem to syntacs check ;)
I think the http://tracker.firebirdsql.org/browse/CORE-1393 is an
imaginative idea and exactly resolve yours problem: what the better
method for boolean storage.
No good answer! as like as "what the better program language?", but have
a new idea for eliminate this problem ;)
"what would happen with a language where the word YES starts with the
letter 'N'" : It's not a problem for a good designed BoolCast(). Must
teach it for true/false ;)
eMeL