On 13/06/2015 09:31, Florian Klämpfl wrote:
It is similar totype tarray = array [1..10] of longint; procedure p(const a1 : tarray;var a2 : tarray); begin a2[1]:=4321; writeln(a1[1]); // surprise end; var arr : tarray; begin arr[1]:=1234; p(arr,arr); end.
I dont see any similarity. You pass 2 pointers to the same memory. No surprise for me. But also no broken ref counting.
_______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
