>>>>>Arnon
>>>>
>>>>You, sir, are indeed correct. That was the original question. My way just seemed to provide for that, and more. Perhaps it was overkill for the stated problem...
>>>
>>>Fred,
>>>I never said that passing a parameter object doesn't solve this problem (and several other probelm) or that it is not a good solution
>>>I just said that what I suggested is also a good solution for the speceific problem
>>>
>>>Arnon
>>
>>Arnon,
>>
>>Got it. Alternate solutions are always good to have. You never know which solution will work out best for any given situation. Any working solution is a good solution.
>
>Actually, I like Arnon's suggestion - the calling routine doesn't have to prepare anything. It calls a function and receives results in an object. It just seems a little cleaner - a function should not modify its parameters, but it should return values, right? So it does, this way.
>
>If we wanted to have something done to an object, wouldn't it be more natural to tell the object to do with itself - it should have the means (aka methods) to do that.
True. But you could also pass this object around to different other objects/functions to manipulate. There's nothing that prevents the parameter object from having it's own methods, too.