RE: VFP Rounding

2010-05-04 Thread Tina Currie
Thanks Richard, That did the trick :-) Glad I just asked rather than screwing around with that for too long! Tina -Original Message- From: Richard Quilhot [mailto:quilh...@gmail.com] Sent: Wednesday, 5 May 2010 8:14 AM To: ProFox Email List Subject: Re: VFP Rounding You could always

Re: VFP Rounding

2010-05-04 Thread kamcginnis
What about floor() - Original Message - From: "Richard Kaye" To: 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 wan

RE: VFP Rounding

2010-05-04 Thread Richard Kaye
full precision. rk -Original Message- From: profoxtech-boun...@leafe.com [mailto:profoxtech-boun...@leafe.com] On Behalf Of Richard Kaye Sent: Tuesday, May 04, 2010 6:15 PM To: profoxt...@leafe.com Subject: RE: VFP Rounding Use TRANSFORM with a picture clause if you're not interested in

RE: VFP Rounding

2010-05-04 Thread Richard Kaye
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 ---

RE: VFP Rounding

2010-05-04 Thread Jarvis, Matthew
> -Original Message- > From: profoxtech-boun...@leafe.com [mailto:profoxtech-boun...@leafe.com] > On Behalf Of Tina Currie > Sent: Tuesday, May 04, 2010 3:00 PM > To: profoxt...@leafe.com > Subject: VFP Rounding > > Hi all, > > > > Hoping you can shed some light for me. I've got a calc

Re: VFP Rounding

2010-05-04 Thread Fred Taylor
You can try this. SET DECIMALS TO 1 more than you're formatting, in your case 3. Then use TRANSFORM(your number,"9.99") to get it as a string. As long as the SET DECIMAL is at least 1 more than you're formatting to, it will truncate, not round. Fred On Tue, May 4, 2010 at 3:00

Re: VFP Rounding

2010-05-04 Thread Richard Quilhot
You could always multiply by 100, apply the integer function, then divide by 100. Richard E. Quilhot C.N.A. quilh...@gmail.com On Tue, May 4, 2010 at 6:00 PM, Tina Currie wrote: > Hi all, > > > > Hoping you can shed some light for me. I've got a calculation that I'm > doing over 4 fields