Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding the decimal
Message
De
06/10/1998 23:55:40
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00144345
Message ID:
00144451
Vues:
24
Sandy ---

Why are you making life difficult? :-)

Having said that, you could try two things....either trapping each keypress and counting each keypress UNTIL the "." (ASC 46) ... I had limited success with that....or doing something fancy on lostfocus...

I have to ask: What are you trying to accomplish?


>>We're trying to figure out if there is a decimal in a numeric field.
>>After checking with type() and fsize() (with set comp off to find field size), How do we find how many decimal places there are. We are trying to avoid the use of afields() function here. We can't use str() because it seems to stop at the decimal point. We can't take the val(str(thisvalue)) and substract it because 125 - 125.00 is still 0.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform