Rounding sort of ....

Richard D. Williams richard at appgrp.net
Thu Mar 8 14:26:12 PST 2018


You guys are amazing.

I don't think anyone just answered his simply question.

Hey Wayne,

This is it.

Let's say xx is 1456.49. You want it to be 1456.00.

if   : mid(xx,"8","3") lt ".51"
then : xx=""{mid(xx,"1","7")

Now let's say xx(10,.2) is equal to 1456.56. You want it to be 1457.00.

if   : mid(xx,"8","3") ge ".51"
then : xx=""{mid(xx,"1","7")+"1"

That should do it for you. The order of these statements is important.
Test for the less than first.

This took me 10 minutes to write the code, test the code, and give an 
answer.
And I don't think Jose would even consider holding "Ken's jockstrap".

Richard D. Williams

Here is the code:

::end:
@keyR::xx(10,.):
::input popup ("22","") xx "Enter>":
:mid(xx,"8","3") lt ".51":xx=""{mid(xx,"1","7"):
:mid(xx,"8","3") ge ".51":xx=""{mid(xx,"1","7")+"1":
::msgbox xx:

On 3/6/2018 8:15 PM, Jose Lerebours via Filepro-list wrote:
> Not sure what you're talking about Mark, but my stab was self 
> inflicted, I was the one waring the blinders and opted to drown in a 
> drop of water by over thinking the post ... refreshing was Ken's 
> suggestion.
>
> Of course, no surprises here.
>
>
> On 03/06/2018 08:33 PM, Fairlight via Filepro-list wrote:
>> Don't even start, Jose.  You couldn't hold Ken's jock strap.
>>
>> m->
>>
>> On Tue, Mar 06, 2018 at 07:32:06PM -0500, Jose Lerebours via 
>> Filepro-list thus spoke:
>>> On 03/06/2018 07:24 PM, Ken Cole wrote:
>>>> Doesn?t converting a ,.2 edit to a ,.0 edit do that automatically?
>>> How refreshing, when one opts drown in a drop of water of refuses to
>>> remove blinders ... lol
>>>
>>> -- 
>>> Jose D. Lerebours
>>> 954-559-7186
>>> https://www.cargosaas.com
>>> http://www.ezbookeep.com
>>> http://www.ezdaemon.com
>>> http://www.fp2php.com
>>>
>>> _______________________________________________
>>> Filepro-list mailing list
>>> Filepro-list at lists.celestial.com
>>> Subscribe/Unsubscribe/Subscription Changes
>>> http://mailman.celestial.com/mailman/listinfo/filepro-list
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20180308/b94e1e1d/attachment.html>


More information about the Filepro-list mailing list