[Gambas-user] iif bug?
ron
ronstk at ...239...
Thu Apr 27 08:16:06 CEST 2006
On Thursday 27 April 2006 01:30, Oliver Etchebarne Bejarano wrote:
> eH-- it fails with text="" or text="oliver" or anything non-numeric.
> Sorry :)
>
> Oliver Etchebarne Bejarano wrote:
> > Hey folks,
hm, here you may be right.
I belive, but can't check it, some returns the number zero.
But strict there is no number so NULL is not absolute wrong.
But you could change it from
id = iif(IsNull(Val(text)), 0, Val(text))
to
id = iif(NOT IsNumber(text), 0, Val("0" & text))
Ron
More information about the User
mailing list