Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numeric divison
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 6 SP3
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01059400
Message ID:
01059425
Views:
9
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform