Some restrictions exist regarding the Attributes of a VariableType or a Variable used as an InstanceDeclaration with regard to the data type of the Value Attribute.
When a Variable used as InstanceDeclaration or a VariableType is overridden or instantiated the following rules apply:
- The DataType Attribute can only be changed to a new DataType if the new DataType is a subtype of the DataType originally used.
- The ValueRank Attribute may only be further restricted
- ‘Any’ may be set to any other value;
- ‘ScalarOrOneDimension’ may be set to ‘Scalar’ or ‘OneDimension’;
- ‘OneOrMoreDimensions’ may be set to a concrete number of dimensions (value > 0).
- All other values of this Attribute shall not be changed.
- The ArrayDimensions Attribute may be added if it was not provided or when modifying the value of an entry in the array from 0 to a different value. All other values in the array shall remain the same.