On 18/02/2007, at 10:57 PM, [EMAIL PROTECTED] wrote:
On Feb 18, 2007, at 12:58 UTC, Tom Benson wrote:
OK, if that's the case then it's something I did not know.
I always thought that ALL parameters were passed byval unless
explicitly passed byref.
That is correct. Andy's explanation is technically incorrect, though
it's sort-of right in spirit.
...
I agree, but that's not what's going on here. I can see how you think
that if you bought Andy's explanation that object variables are
implicitly passed ByRef, but that's not the case.
Umm, just to be pedantic, that's NOT what I said.
On 18/02/2007, at 7:30 PM, Andy Dent wrote:
Anything other than a primitive data type like an integer IS passed
"by reference" in Pascal terms (or in C terms, as a pointer).
Objects are passed around as pointers to the memory structure that
contains the object.
I wasn't sure exactly where Tom was coming from but anyone with a C
struct or Pascal structure or C++ object background would have
related to what I said.
A C programmer understands pointers being copied as values.
RB Objects, strings and arrays are "reference data types" as opposed
to "scalar values".
Andy
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>