Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Round Down
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Titre:
Divers
Thread ID:
00012128
Message ID:
00012138
Vues:
37
>>>Does anyone have or know how to round down in foxpro 2.6a. What the user wants is to take 2 numbers and multiply those together to get a rounded down third number. Example:
>>>
>>>num1 = 1.254
>>>num2 = 2
>>>
>>>num1 * num2 = 2.508
>>>
>>>But they want 2.50 stored in the table.
>>>
>>try 0.01*int(x*100).
>>
>>HTH,
>>
>>Marc
>
>
>try the FLOOR function. i know it works w/ integers -- sorry i don't have access to the fox help files right now.

No, I use these, and unfortunately it and CEILING are INT only -- I wish they included decimals, though. You could * 100 , FLOOR, and divide by 100 to get the job done...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform