>> I now see that this is true only for base data types (strings,
>> integers, doubles etc).
> 
> No, it's true for all variables of any type.  But think carefully about
> what constitutes a "change made to the passed variable".

Now I'm a wee bit confused...

To clarify my thinking:

If I set X=1 and then pass x to a sub ByRef,and within that sub set X=3,
then when I return to the original method, that method will now see x=3.

If I set x=2 and then pass normally (byVal), and within that sub set x=3,
then when I return to the original method, that method will still see x=1.

Reconciling this with Joe's statement about "all variables of any time", I
guess what's actually happening is that a new version of x is returning to
the calling method when I pass ByRef.

Right?

- John


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to