Re: VFP Rounding

Author: <kamcginnis@gmail.com>

Posted: 2010-05-04 at 18:49:39

What about floor()

----- Original Message -----

From: "Richard Kaye" <RKaye@artfact.com>

To: <profox@leafe.com>

Sent: Tuesday, May 04, 2010 3:32 PM

Subject: RE: VFP Rounding

And as someone else mentioned you do need to set decimals to some number greater than the precision you want to preserve

if you don't want the transform to do an implicit round. The PADx functions also do an implicit transform if you want a

fixed string length but then you will get full precision.

rk

-----Original Message-----

From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com] On Behalf Of Richard Kaye

Sent: Tuesday, May 04, 2010 6:15 PM

To: profoxtech@leafe.com

Subject: RE: VFP Rounding

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

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

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/014101caebdc$15d36b30$7a00a8c0@w2k3s02

** 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.

©2010 <kamcginnis@gmail.com>