Aaron Scott-Boddendijk asked:
> Do does delphi handle it's dynamic array passing when passed as
> a typed parameter,
> does delphi pass only the reference or does it still pass the
> entire array as value.
A quick look at the assempbler in System.pas and the code generated by
dynamic array passing and assignment and reveals that the dynamic arrays
are passed by reference and use reference counting in a very similar
manner to strings. There is also a very similar sort of local stack clean
up that occurs when you leave a procedure that has created a dynamic
array.
In general all questions of this natiure can be solved by writing a small
test program, placing a break point at the appropiate place and then
having a look at the assembler debug window to see what code Delphi has
produced. Also interesting to have a look at the optimised vs. the
unoptimised code.
Cheers, Max.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz