Truncate
Bruce Easton
bruce at stn.com
Thu Dec 12 10:36:42 PST 2013
Yes - I have to wonder what other values might be present in his data
that don't fit the pattern ####9.500
On 12/12/13 1:24 PM, Kenneth Brody wrote:
> 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"
>
More information about the Filepro-list
mailing list