From: Sebastian Hungerecker Date: 2008-03-12T07:08:17+09:00 Subject: Re: whats the error here? Adam Akhtar wrote: > Whats wrong with lcdchar = @template[chr][segment] ??? There's certainly nothing wrong with the syntax (i.e. it's perfectly valid ruby code). The only thing wrong with the semantics is that you're assigning to a local var which goes out of scope right away. > Is it because @template is a class variable @template is not a class variable. class variables have two @s. One @ is for instance variables. > and lcdchar is trying to > point to it thus allowing for the possibility of accesing the contents > of the class variable from outside of the class??? You can't access lcdchar from outside the class. You can however access the value it points to from outside (because that's also the return value) and you can even access @template from outside (via instance_variable_get for example). And no, that's most certainly not the reason your IDE complains. > All i want to do is > to copy the contents to the variable lcdchar. Copy to where? HTH, Sebastian -- NP: Dornenreich - Zu Träumen wecke sich, wer kann Jabber: sepp2k@jabber.org ICQ: 205544826