Rounding sort of ....
Richard D. Williams
richard at appgrp.net
Thu Mar 8 14:43:03 PST 2018
As per Jose, this works as well;
@keyR If:
Then: xx(10,.)
3 ------- - - - - - - - - -
If:
Then: input popup ("22","") xx "Enter>"
4 ------- - - - - - - - - -
If: FRAC(xx) le ".50"
Then: xx=FLOOR(xx)
5 ------- - - - - - - - - -
If: FRAC(xx) gt ".50"
Then: xx=CEIL(xx)
5 ------- - - - - - - - - -
If:
Then: msgbox xx
Richard
Thanks Jose.
On 3/8/2018 4:26 PM, Richard D. Williams via Filepro-list wrote:
> 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>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
>
> ---
> This email has been checked for viruses by AVG.
> http://www.avg.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20180308/7c0fd8fa/attachment.html>
More information about the Filepro-list
mailing list