I student asked me a interesting question:
If I am passing an array argument to a function
( function (i:list):integer; )
does it ALWAYS copy the array to
a new location for the new varlible,
EVEN if I am doing only READ operations ?
i.e. Does the compiler "optimize" the code and change it to by var
( function (VAR i:list):integer; )
because its much cheapper to pass a pointer then coping an array ?
The interface is good old TP7...
Anybody knows anything ?