> So the point is?
That in both cases the object is modifiable yet only the 'var' case allows the
reference
pointer itself to be changed (since the reference pointer is passed by reference).
> In procedure A, you are passing a reference by value, and in procedure B,
> you are passing a reference by reference (ie. pointer to pointer). Where is
> it that Delphi lies? Bear in mind that all objects in Delphi are references
> (ie pointers).
Delphi is not doing an offset when accessing via the '.' operator it is in fact doing
'^.'
hiding the fact that the is a dereference involved. The lie is that an instance
declaration
is only a pointer declaration...
> This is not necessarily true. In D2 and above, passing a string (which by
> default is an AnsiString) by value only passes the string REFERENCE by
> value. This means only the reference (pointer) is copied. The data is not.
> If you then modified the string in the procedure, the copy on write
> mechanism in Delphi will then create a new instance.
[Long String example noted]
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.
--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz