Sometimes, you may wish to hide things from inheriting programs, or
prevent functions from being called from other objects. To do so you use
modifiers. A modifier is simply a word written before a variable
definition, function definition, class definition or an inherit that
specifies how this identifier should interact with other objects and programs.
These modifiers are available:
When modifiers are used in conjunction with inherit, all the variables,
functions and classes copied from the inherited class will be modified
with the keywords used. For instance, private inherit means that
the identifiers from this inherit will not be available to program inheriting
this program. static private inherit will also hide those identifiers
from the index and arrow operators, making the inherit available only to the
code in this program.
- Static hides this identifier from the index and arrow operators, which
makes it impossible for other objects to call this function unless a
function pointer to it is returned from inside this program.
- This prevents other objects from re-defining this identifier in
programs that inherit this program.
- This makes the identifier 'local' meaning that even if
it is overloaded in an inheriting program, this program will still
use this identifer.
- This prevents inheriting programs from accessing this identifier.
Note that inheriting program can still re-define the identifier.
Also note that private does not imply static.
- This is the opposite of private. This is the default for
all identifiers. public can be used to override the effects
of a private inherit.
- Reserved for future use.