Hi!
val() function do not recognize the currency symbol(s) before number. Any character except number, +- and $ are considered as wring character so zero returned. If you want it recognize currency symbol(s) and return th Y type in such case, use something like following:
? val(STRTRAN("£123.23",SET("currency"),"$"))
>Hello again all,
>
>My second bug in 1 day...
>
>set currency to "£"
>? val("123.23") && returns 123.23
>? val("$123.23") && returns 123.23 -- Vartype = Y
>? val("£123.23") && returns 0.00 -- Vartype = N
>
>VFP Does exactly the same thing whatever set currency is set to, it appears that VAL always accepts the US Dollar and returns type currency (not what the doc's say)
>
>(my currency symbol in Windows is set to Swiss francs)
>
>by any chance is this fixed in VFP7? - (Racking up that ammunition)
>
>TIA
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.