Difference between revisions of "Variables and Properties"

1 byte removed ,  21:32, 24 January 2012
m
Typo: "it's" -> its"
imported>Henning
 
imported>Kivan
m (Typo: "it's" -> its")
Line 3: Line 3:
Variables and Properties are similar things, they both "hold" values and objects. A variable is "private" meaning that only that script is aware of them, can set their contents, and get their contents.  A Property is essentially a variable that other scripts can access, their contents can be set and get by a other scripts.
Variables and Properties are similar things, they both "hold" values and objects. A variable is "private" meaning that only that script is aware of them, can set their contents, and get their contents.  A Property is essentially a variable that other scripts can access, their contents can be set and get by a other scripts.


If a variable or property holds a numeric value, like an integer, get/set returns it's value. If a variable or property holds an object, you can access that object's properties and functions. (This is analogous to a reference variable from the old scripting system.)
If a variable or property holds a numeric value, like an integer, get/set returns its value. If a variable or property holds an object, you can access that object's properties and functions. (This is analogous to a reference variable from the old scripting system.)


=Declaring Variables=
=Declaring Variables=
Anonymous user