[Newbies] Smalltalk constants

Delyan Kalchev delyank at gmail.com
Thu Nov 6 14:44:49 UTC 2008

On Wed, Nov 5, 2008 at 2:09 PM, Mark Volkmann <mark at ociweb.com> wrote:
> The recommended way to implement constants in Smalltalk is by writing a
> class method that simply returns the constant value. For example, see the
> class method pi in the Math class. Actually this class also represents
> constants as class variables whose values are set in the class initialize
> method. In this case the class variable Pi is set in initialize and that is
> returned from the class method pi.
> ---
> Mark Volkmann
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners


More information about the Beginners mailing list