Howto:Start using vectors and hashes in Nasal: Difference between revisions

Jump to navigation Jump to search
m
Switch to the {{forum link}} template for all forum links.
(added iterating hash documentation and example)
m (Switch to the {{forum link}} template for all forum links.)
Line 535: Line 535:
A "class" is really just a template for a certain data type that consists of other data types and provides functions to work with the class. The functions publicly accessible are called its "interface" because these functions are meant to be used by the users of your class. This is in contrast to member fields which are usually not meant to be accessed directly.
A "class" is really just a template for a certain data type that consists of other data types and provides functions to work with the class. The functions publicly accessible are called its "interface" because these functions are meant to be used by the users of your class. This is in contrast to member fields which are usually not meant to be accessed directly.


Once a class is used as a template to create a new object, we say the class is getting "instantiated", i.e. an instance of the class (an actual object) is created. This makes it then possible to actually make use of its interface and access member functions (which are methods). Also see [http://flightgear.org/forums/viewtopic.php?f=30&t=14737#p145769].
Once a class is used as a template to create a new object, we say the class is getting "instantiated", i.e. an instance of the class (an actual object) is created. This makes it then possible to actually make use of its interface and access member functions (which are methods). Also see {{forum link|p=145769}}.




Navigation menu