Currency and percentage in numeric evaluation

MisterX b.xavier at internet.lu
Sun Apr 10 11:29:33 EDT 2005


if it's a number return true

other wise you have to parse it char by char to do any kind of an effective
job. A grep bolean search could help too...

cheers
Xavier


> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> Richard Gaskin
> Sent: Sunday, April 10, 2005 17:03
> To: How to use Revolution
> Subject: Currency and percentage in numeric evaluation
> 
> I need to evaluate a large number of short strings to 
> determine whether they are numeric.  Some of these are 
> percentages, and include the "%", and others are currency and 
> can contain "$". the Euro, Yen, or any number of other signs.
> 
> With dates we have a convenient test:  try to convert it, and 
> if it fails it will tell you why.
> 
> But we have no such convenience with percentages and 
> currency.  So what is the most efficient (heck, I'd settle 
> for reasonable efficient) way to determine if a string is 
> numeric given the wide range of currency formats in common use?
> 
> --
>   Richard Gaskin
>   Fourth World Media Corporation
>   ___________________________________________________________
>   Ambassador at FourthWorld.com       http://www.FourthWorld.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 



More information about the use-livecode mailing list