Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a truncate function?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01107703
Message ID:
01107711
Vues:
20
Of a top of my head
* FUNCTION Truncate
LPARAMETERS tnNumber, tnDp
RETURN ROUND(tnNumber  - (5/(10^(tnDp+1))), tnDp)
>is there a numeric truncate function in VFP as in:
>Truncate(2.347,2) returns 2.34
>Truncate(2.341,2) returns 2.34
>Truncate (78.1297,3) returns 78.129
>Similar to round but without the rounding bit
>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform