Truncate

Kenneth Brody kenbrody at spamcop.net
Thu Dec 12 10:24:21 PST 2013


On 12/12/2013 11:50 AM, Bruce Easton wrote:
> Also, Matt, in your solution you used this twice:
>
> ::wa=wa+50
>
> I'm assuming you meant ::wa=wa+"50"

And yet, the sole purpose of his adding fifty is to "round" the number after 
using INT() to truncate the value and circumvent the rounding that filePro 
would have done for you.

> On 12/12/13 11:40 AM, Kenneth Brody wrote:
>> On 12/12/2013 11:13 AM, Matt Sherrill wrote:
>>> With the help of Ken White, Kenneth Brody and Robert T. Repko, I was able
>>> to find a solution to my problem.
>> ... "46949.500" --> "46900"
>> ... "46959.500" --> "47000"
>>
>> Now that you have clarified that you actually mean "round" and not
>> "truncate", your code can be greatly simplified by simply allowing filePro
>> to do the rounding for you:
>>
>>        result = doedit(number/"100",".0","10") * "100"

-- 
Kenneth Brody


More information about the Filepro-list mailing list