Use TRANSFORM with a picture clause if you're not interested in the extra 
precision. Otherwise use ROUND.

m.v1=100.1234
m.v2=100.1234
m.v3=100.1234
m.v4=100.1234
m.nresult=m.v1+m.v2+m.v3+m.v4
m.cresult=transform(m.nresult, '@R 999,999,999.99')
WAIT WINDOW m.nresult
WAIT WINDOW m.cresult


rk

-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Tina Currie
Sent: Tuesday, May 04, 2010 6:00 PM
To: [email protected]
Subject: VFP Rounding

Hi all,


Hoping you can shed some light for me.  I've got a calculation that I'm
doing over 4 fields and then I convert the result to character by applying
STR() function - doing this to a length of 20 and decimal places of 2.  This
rounds UP my result.  I don't want this to happen.  Just want it to give me
the result to 2 decimal places.

Is this possible in Fox?


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/df1eef11e586a64fb54a97f22a8bd0440682815...@ackbwddqh1.artfact.local
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to