Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Vilhelm-Ion Praisach
  Where is Vilhelm-Ion Praisach?
 Resita
 Romania
 Vilhelm-Ion Praisach
 To: David Mustakim
  Where is David Mustakim?
 Jakarta
 Indonesia
 David Mustakim
 Tags
Subject: RE: Rounding off to nearest 10
Thread ID: 394147 Message ID: 394231 # Views: 46 # Ratings: 0
Version: Visual FoxPro 6 Category: General VFP Topics
Date: Tuesday, December 31, 2013 9:23:07 PM         
   


> >
> > Good point. Thank you!
> > Both Stefan Wuebbe and Glen Villar solutions can be adapted similarly.
> >
? SIGN(a)*(ABS(a) - MOD(ABS(a),-10))
> > ?SIGN(a)*CEILING(ABS(a)/10)*10

> >
> > If the values contain subunits (cents), then your solution would be :
> >
procedure round10
> > lparameters n
> >    return round(abs(n)+4.999,-1)*sign(n)
> > endproc

> >
> > P.S.
> > I need to apologize but I'm a poor english speaker. What do you mean by [snip]?
> >
> > My respects
>
> either this:
> http://en.wikipedia.org/wiki/Snipping_Tool
> or this:
> http://www.thefreedictionary.com/snip
> but best:
> http://wiki.answers.com/Q/What_is_a_snip
>
> .

I believe you are one year ahead of me. That's explains a lot. ;-)

My respects

ENTIRE THREAD

Rounding off to nearest 10 Posted by barney guna @ 12/31/2013 12:17:13 AM
RE: Rounding off to nearest 10 Posted by Stefan Wuebbe @ 12/31/2013 1:01:45 AM
RE: Rounding off to nearest 10 Posted by barney guna @ 12/31/2013 3:05:47 AM
RE: Rounding off to nearest 10 Posted by barney guna @ 1/2/2014 8:13:00 AM
RE: Rounding off to nearest 10 Posted by Stefan Wuebbe @ 1/2/2014 8:25:14 AM
RE: Rounding off to nearest 10 Posted by David Mustakim @ 1/2/2014 8:25:52 AM
RE: Rounding off to nearest 10 Posted by Glen Villar @ 12/31/2013 1:16:20 AM
RE: Rounding off to nearest 10 Posted by barney guna @ 12/31/2013 3:13:10 AM
RE: Rounding off to nearest 10 Posted by Vilhelm-Ion Praisach @ 12/31/2013 12:12:34 PM
RE: Rounding off to nearest 10 Posted by barney guna @ 1/2/2014 8:13:34 AM
RE: Rounding off to nearest 10 Posted by barney guna @ 1/2/2014 8:13:20 AM
RE: Rounding off to nearest 10 Posted by Vilhelm-Ion Praisach @ 12/31/2013 4:24:16 AM
RE: Rounding off to nearest 10 Posted by Gene Wirchenko @ 12/31/2013 7:48:57 PM
RE: Rounding off to nearest 10 Posted by Vilhelm-Ion Praisach @ 12/31/2013 8:59:39 PM
RE: Rounding off to nearest 10 Posted by David Mustakim @ 12/31/2013 9:15:55 PM
RE: Rounding off to nearest 10 Posted by Vilhelm-Ion Praisach @ 12/31/2013 9:23:07 PM
RE: Rounding off to nearest 10 Posted by David Mustakim @ 12/31/2013 9:25:48 PM
RE: Rounding off to nearest 10 Posted by Anders Altberg @ 1/1/2014 3:35:51 PM
RE: Rounding off to nearest 10 Posted by Vilhelm-Ion Praisach @ 1/1/2014 4:31:45 PM
RE: Rounding off to nearest 10 Posted by barney guna @ 1/2/2014 8:14:11 AM
RE: Rounding off to nearest 10 Posted by Anders Altberg @ 1/4/2014 1:25:13 AM
RE: Rounding off to nearest 10 Posted by barney guna @ 1/2/2014 8:13:52 AM
RE: Rounding off to nearest 10 Posted by Gene Wirchenko @ 12/31/2013 10:59:47 PM
RE: Rounding off to nearest 10 Posted by barney guna @ 1/2/2014 8:12:46 AM
RE: Rounding off to nearest 10 Posted by David Mustakim @ 1/2/2014 9:45:35 AM
RE: Rounding off to nearest 10 Posted by Tore Bleken @ 1/2/2014 9:54:32 AM
RE: Rounding off to nearest 10 Posted by Luis Maria Guayan @ 1/6/2014 8:39:08 PM