[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] OTCL DOUBT !!!
On Thu, 6 Jul 2000, A. Jain wrote:
> Suppose there is a method in a class.
> You define some instance variable in the method.
> Then you set the local variables to be instance variable
> $ set <local var> <instance var>
>
> Now my question is that now if you set the value of local variable to
> be, say X, then would the value of instance variable be X too
> automatically.
>
> to put it formally
> in the statement
> $ set <local var> <instance var>
> is the pasing from right to left is "by value" or "by reference "
by value.
If it passed by reference, what would be the point of creating the
local variable in the first place?
L.
<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>