[fpc-pascal] Re: Correct use of var in function calls?
michael.vancanneyt at wisa.be
michael.vancanneyt at wisa.be
Mon Feb 7 09:59:24 CET 2011
On Sun, 6 Feb 2011, Florian Klämpfl wrote:
> Am 06.02.2011 18:53, schrieb Bo Berglund:
>>
>> So in summary:
>> If the called method changes the length of teh dynamic array it must
>> be passed as a var, otherwise the length change will be lost when
>> exiting the method.
>
> I'd even propose that one uses var as soon as he plans to change the
> array. It makes the code easier to understand.
Indeed. It indicates that you expect the array to be changed.
Michael.
More information about the fpc-pascal
mailing list