Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Currency VS numeric
Message
De
05/10/2001 21:27:10
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
05/10/2001 19:36:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00565056
Message ID:
00565064
Vues:
29
>I recently found something new for me when comparing a numeric value against a currency field which are supposed to contain exactly the same amount.
>
>Through the debugger window the numeric variable is shown as:
>Name: tnMonto
>Value: 61323.0200000
>Type: N
>
>The field as:
>Name: monto
>Value: $ 61323.0200
>Type: Y
>
>However when validating “tnMonto = monto” I get a False value.
>
>Any hints about what is going on are greatly appreciated.
>
>Thanks in advance and regards.
>
>Oscar Corte

As a workaround, try converting with ntom() or mton().
? ntom(lnMonto) = lyMonto
where the second letter indicates the type (N = numeric, Y = currency).

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform