A variable may be of a defined class, if so designated by the user. Variable classes are primarily used as a means of grouping associated variables together and are not predefined to mean anything, but may be defined as the user requires them. To set a variable's class, the SetVariableClass function may be used, or the class number may be added to the variable's declaration or to the declaration of a group of variables of the same class:
[
FlowRate = 32 (0x0015);
PNum (0x0015);
X;
Y;
]
In this example, the first two variables have their class designated by the hexadecimal number 15 (0x0015), although in the case of FlowRate, a default value of 32 has also been set. Since these two variables have the same class designation, they could have been grouped together as follows:
[
Constant PUMP 0x0015;
[ (PUMP)
FlowRate = 32;
PNum;
]
X;
Y;
]
Notice that in this case, the variable class for FlowRate and PNum is a constant variable called PUMP whose value has been set at 0x0015 in a previous declaration statement. No matter which method is used, the class definition must be a constant or an expression that evaluates to a constant, whose value is between 0 and 65 535.