Currency and percentage in numeric evaluation

Robert Presender rpresender at cox.net
Mon Apr 11 09:07:14 EDT 2005


Hi Richard:

I put the following into the msg box

put "12%" into holder
put holder is a number

The above returns returns false

Regards .... Bob



On Apr 10, 2005, at 9:00 AM, Richard Gaskin wrote:
> 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



More information about the use-livecode mailing list