What is the diference of *@thisvariable* and *thisvariable* ?? Thank you -- Pedro C. Valentini pedro-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org +55 (21) 8708-8035
Hi! On Tue, 12 Apr 2005, Pedro Valentini wrote the following:> What is the diference of *@thisvariable* and *thisvariable* ??the @ one is an instance variable, the other one a local variable, see: http://www.rubycentral.com/book/tut_classes.html bye Wolfgang
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Pedro Valentini wrote: | | What is the diference of *@thisvariable* and *thisvariable* ?? @foo is an "instance variable" foo is a local variable. instance variable means it persists within the current object... this is useful for passing data from the controller to the view. a local variable only has scope within the local block or function. A better explanation can be found by reading the pickaxe: http://www.rubycentral.com/book/ - -- David Morton Maia Mailguard server side anti-spam/anti-virus solution: http://www.maiamailguard.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCXDftSIxC85HZHLMRAiHdAJwIHx3NOGdUcSUp/8b59reOZwu4pgCgo1Xl pby/8jFOBjyXLIhEFNdLGXY=3vIu -----END PGP SIGNATURE-----