[Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3
Benoît Minisini
gambas at ...1...
Wed Nov 24 14:23:20 CET 2010
>
> Benoît,
>
> MAJOR PANIC! I use IsNumber extensively to do quick checks on field
> parsing across heterogeneous databases. Using the 80-20 rule I can parse
> text fields for junk appendices to an expected numeric.
> Code such as
>
> vItem=split(result!note," ",NULL,TRUE)[0]
> IF IsNumber(vItem) THEN RETURN Val(vItem)
> ' else begin parsing diabolical note structure
> .....
>
> abounds.
>
> Please reconsider this.
Then you are using IsNumber() the wrong way: in your code, vItem is a string
(I guess), and so IsNumber(vItem) will always return FALSE.
You used IsNumber() as if it would tell you if a string can be converted to a
number, which it does not at the moment! And which is exactly what I want to
change!
--
Benoît Minisini
More information about the User
mailing list