> apart from religion - I was just wondering what the advantage might be of
> using a property in this case.

It's mainly about encapsulation. There may be a reason to make this a global
(if it is going to accessed by a number of scripts, perhaps - though I
personally would still favor the object-oriented approach even if that is
the case), but in this very simple example, there is no need for this
variable outside of its object. Thus, no need to make it globally available.
By encapsulating it, its value won't be changed by outside methods by
mistake - only on purpose.

> I seem to be using much more globals than you guys do. I've often asked
> myself if I was missing something.

It's a broad subject. Check out Irv's lingo oop treatise if you want to
learn more about oop: http://www.furrypants.com/loope/

-Kurt

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to