Programmer Guide/General Descriptions/Instance Environment: Difference between revisions
From STX Wiki
Jump to navigationJump to search
No edit summary |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:{{SUBPAGENAME}}}} | {{DISPLAYTITLE:{{SUBPAGENAME}}}} | ||
{{PG_GeneralDescriptions}} | |||
Instance variables are preceded by the ampersand character <code>&</code>. | |||
No special variables are defined for the instance environment. | |||
You can retrieve the value of an instance variable using the syntax: | |||
instance[!variable,varname] | |||
For example: | |||
$#obj[!variable,xmin] | |||
Will return the value of the <code>&xmin</code> variable in the <code>$#obj</code> instance. | |||
A programmer should take care about variables used in base classes and about the fact that instance variables can also be accessed and changed from outside the class/instance e.g. by using <code>instancename.variablename</code> in a <code>READ</code> command or an assignment statement. |
Latest revision as of 15:15, 14 December 2017
Instance variables are preceded by the ampersand character &
.
No special variables are defined for the instance environment.
You can retrieve the value of an instance variable using the syntax:
instance[!variable,varname]
For example:
$#obj[!variable,xmin]
Will return the value of the &xmin
variable in the $#obj
instance.
A programmer should take care about variables used in base classes and about the fact that instance variables can also be accessed and changed from outside the class/instance e.g. by using instancename.variablename
in a READ
command or an assignment statement.