[Newbies] Where to 'declare' symbols
John Almberg
jalmberg at identry.com
Tue Aug 14 01:53:12 UTC 2007
Sorry... probably 'symbol' isn't the right word, since as far as I
know, something like #aSymbol doesn't have any value other than it's
own identity.
What I really want is a named constant that has a value. Like
iAmAConstant = 5. Is there such a thing in Smalltalk?
-- John
On Aug 13, 2007, at 9:43 PM, John Almberg wrote:
> I want to eliminate a 'magic number' used by methods in a single
> class. I'd like to do that by creating a symbol that would be
> available to all the methods in the class. Where and how should I
> create such a symbol? I can't seem to find an example anywhere.
>
> Thanks: John
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
More information about the Beginners
mailing list