[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: Class-level readers and writers

dblack

12/2/2003 2:53:00 PM

1 Answer

matz

12/2/2003 3:40:00 PM

0

Hi,

In message "Re: Class-level readers and writers"
on 03/12/02, "David A. Black" <dblack@wobblini.net> writes:

|> D> From Matz's description I'm not sure I see any difference; they're
|> D> both described as "local to the class/module".
|>
|> Well, except that one is described in the slide 13 and the other in the
|> slide 20. Perhaps it's important
|
|OK, I'm officially being stupid. Can someone please explain?

@_v is an instance variable whose scope is limited to the
class/module. @@v is a class variable, which is kinda like global
variable whose scope is limited to the class/module.

matz.