Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Formating display of floating point numbers
Message
De
09/08/2011 05:17:33
 
 
À
08/08/2011 18:15:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01520460
Message ID:
01520484
Vues:
60
>I have *lots* of fields that are B(16)
>
>If I want to display that number rounded to the fourth decimal, for example, in a textbox what are my options for formatting the display ( assuming not just creating a dummy display field and converting the number )
>
>Seems there should be an easy trick to it, but I'm not seeing a format that looks right and I can't use an input mask for display - or can I ?
>
>This is bound data ( albeit bound through VFE field objects so I do have some wiggle room in formatting before I display if I can just figure out what I want to tell it.
>
>So, I have 008900098080.98090000000 and I just want to see 8900098080.9809 or even expressing in millions 8900.1
>
>Suggestions?
>
>TIA

You must round(,4) the field.

texbox.InputMask doesn't round values

However, there are few float numbers that VFP's Round () does not round properly.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform