Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Numeric divison
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 6 SP3
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Divers
Thread ID:
01059400
Message ID:
01059425
Vues:
10
>Dear Experts
>
>nval1=342.36548
>
>I want to divide it into two parts as
>Int part will be first part
>Two digists after decimal will be the second part
>
>For example
>nval2=342
>nval3=36
>

Do you want to round it up or down?

Here's a solution that will get you all the decimal places as an integer.
lnnum = 342.36548
lnint = INT(lnnum)
lndec = lnnum - lnint
lnpower = LEN(TRANSFORM(lndec)) - 2
? lndec * (10 ^ lnpower)
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform