Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Formating display of floating point numbers
Message
De
08/08/2011 18:15:30
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Formating display of floating point numbers
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01520460
Message ID:
01520460
Vues:
133
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


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform