Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Using Transform()

Status
Not open for further replies.

Serincino

Programmer
Jun 13, 2003
61
US
I'm using transform to convert a decimal number into a string so I can print it into a messagebox.

num = 4.461
nums = transform(num,[999.999])


when I print nums I get 4.460 this happens on any number with 3 decimal places or more.

I'm using VFP 8.0, bu I've tested this wit FP 2.0 and it does the samething. Does anybody know of another way to convert this? The only thing I can think to do is use a substr() to get the end part of the number then convert them seperately then add the strings together.

-Serincino
 
I suspect your decimals setting is less than 3.

Type:

SET DECI TO 4

To Check it, type:
? SET("DECIMAL")

Jim Osieczonek
Delta Business Group, LLC
 
thanks a bunch.... that fixes the problem.

-Serincino
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top