Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Found another bug
Message
 
 
À
04/07/2001 11:53:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00526700
Message ID:
00526719
Vues:
11
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform