On 10/3/05, Glenn M. Lewis <[EMAIL PROTECTED]> wrote: > > Hi all! I'm trying to learn Rebol by actually writing something with it.= :-) > > How do I differentiate between static class methods and 'normal' > class methods? Hmmm... that's not the right name... I mean to different= iate > between methods that don't require a 'self' pointer and those that do. > > Also, how do I differentiate between static class data and 'norma= l' > class data? For example, a class may wish to keep track of the number of > instances of this class out there, which would be a static integer of tha= t > class, whereas each instance may wish to keep its own 'ID', which would b= e > a local member of that instance of the class. > > Am I making any sense?
demo: context[ shared-num: 0 proto: context[ own-num: 234 init: [ shared-num: shared-num + 1 ] ] ] instance1: make demo/proto[ own-num: 345 do init ] instance2: make demo/proto[ own-num: 456 do init ] ?? demo ?? instance1 ?? instance2 > I read the online documentation, and particularly studied the "Cl= asses" > section, but couldn't figure out the distinction between the two, or if > there is a concept of static methods or static data at all. > > Thanks! > -- Glenn > -- > To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject. > > -- -Volker "Any problem in computer science can be solved with another layer of indirection. But that usually will create another problem." David Wheeler -- To unsubscribe from the list, just send an email to lists at rebol.com with unsubscribe as the subject.
