Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Found another bug
Message
From
04/07/2001 12:55:09
 
 
To
04/07/2001 11:53:00
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00526700
Message ID:
00526719
Views:
10
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.com
ICQ #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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform