Re: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3
Brought to you by:
gambas
|
From: Benoît M. <ga...@us...> - 2010-11-24 13:23:33
|
> > 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 |