Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: quick question about @ and @@
darren kirby
5/17/2007 4:29:00 PM
quoth the Mike Steiner:
> What's the difference between @ and @@? Specifically, which should I use if
> I need a global variable in a non-OOP Ruby program?
>
> Thanks!
>
> Mike Steiner
As I understand it, '@' denotes an instance variable, visible only to the
instance of a class, and '@@' is a class variable, visible to all instances
of the class.
If you need a plain old global try: $foovar
-d
--
darren kirby :: Part of the problem since 1976 ::
http://badco...
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: quick question about @ and @@
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password