A symbol is a unique string. Its value is itself. A symbol is not a  
variable which has a value.
But a variable may contain a value.

Have fun learning and do not hesitate asking questions.

Stef

On Apr 8, 2009, at 3:56 AM, Mariano Martinez Peck wrote:

>
>
> On Tue, Apr 7, 2009 at 10:47 PM, Andrey Larionov  
> <[email protected]> wrote:
> Is symbol may contain a value?
>
> As I understand it, the symbol is the value itself. Suppose you use  
> #something. Everywhere in the image you use #something, you will be  
> talking about the same symbol. They don't have a dynamic value as  
> String. I mean, in String you set it a value. In symbols, they  
> already are the value. They are literal.
>
> I don't know If I am being clear enough.
>
> Greetings,
>
> Mariano
>
>
> 2009/4/8 Mariano Martinez Peck <[email protected]>:
> >
> >
> > On Tue, Apr 7, 2009 at 9:21 PM, Andrey Larionov <[email protected] 
> >
> > wrote:
> >>
> >> Two test in FontTest assumes what TextStyle>>default will answer a
> >> some Accuny font with some size. But if we override default font -
> >> test will fail. I'll try to find solution and fix, but new vm and
> >> image crashed during debuging.
> >> I think solution will be to create corresponding TextStyle for  
> test.
> >>
> >> Also i'm a newbie and can some clarify what is DefaultTextStyle? It
> >> not declared as instance or class variable.
> >
> > I am also a but newbie but I think that's a symbol Is it actually
> > #DefaultTextStyle ?
> >
> > If true, yes, it would probably be a symbol. A symbol, as Squeak  
> By Example
> > says is:
> >
> > "
> > Symbols are like Strings, in that they contain a sequence of  
> characters.
> >     However, unlike a string, a literal symbol is guaranteed to be  
> globally
> >     unique. There is only one Symbol object #Hello but there may be
> >     multiple String objects with the value 'Hello'.
> > "
> >
> > See SBE for more documentation.
> >
> > However, if there is something that it is not a class neither a  
> class
> > variable, it can be a global variable. For example, do a expect it  
> of
> > Smalltalk. You may think Smalltalk is a class, but it doesn't. It  
> is global
> > variable. Indeed it is an object of SystemDirectory.
> >
> > Cheers,
> >
> > Mariano
> >
> >>
> >> _______________________________________________
> >> Pharo-project mailing list
> >> [email protected]
> >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >
> >
> > _______________________________________________
> > Pharo-project mailing list
> > [email protected]
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to