[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Attempted roadmap of future instance variables....

Christoph R.

12/2/2003 4:54:00 PM

Steve Tuckner wrote:
...
> So what is the relationship between @_ vars and @vars that
> are defined in a class context (if any)? Is this just to
> allow easier access to class local vars (that you can already
> define)? Does below describe the situation accurately?
>
> class A
> @a = 1 # a is a class local variable
> @_a = 2 # a is also a class local variable

No these are entirely different beasts - they are "class
instance variables" (I am just ignoring the fact that the
second is a "class local" variant - since this would probable
create further confusion).


...

/Christoph