> > You can use a trick

> >

? ROUND(nxx+5,-1)

who gives 89770

> > but, unfortunately, fails for nxx=89760 because it gives 89770.

>

> Add 4 instead.

>

> You will still have to account for negative numbers.

>

> [snip]

>

> > In conclusion, Mr. Stefan Wuebbe's solution is simpler and clearer

>

> I looked at his code. Barney stated that he is generating bills. What about a negative bill (say cancelling a bill)? Stefan's code would round the wrong way for negative numbers because ceil() is non-symmetric about 0.

>

> For symmetric about 0, this will do it:

>

>

> procedure round10
> lparameters n
>
> return round(abs(n)+4,-1)*sign(n)
>
> endproc
>

>

> Sincerely,

>

> Gene Wirchenko

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