Row_Class Attribute
Data Type: Class
4GL Access: RW1
The Row_Class attribute references the Class object that corresponds to the declared data type of the array. All items in the array must be of this class or one of its subclasses.
Usually, the data type of an array is defined at compilation time by a code declaration; this attribute provides a way to determine the data type of an array at runtime, and to create an array dynamically at runtime.
Note: The Row_Class attribute is defined as RW1 (read-write-once). Like all such attributes, once set, it must not be reset; resetting the Row_Class attribute is unsupported. In future versions of OpenROAD this will be enforced.
Default: NULL
Example—Row_Class attribute:
createdArray = CreateArray(arrayClass=StringObject);
...
IF createdArray.Row_Class = StringObject THEN
createdArray.GetAttribute(value=Byref(msgtext));
ELSEIF createdArray.Row_Class = ChoiceDetail THEN
createdArray.GetAttribute(enumtext=Byref(msgtext));
ENDIF;
MESSAGE msgtext;
...
PROCEDURE CreateArray(
arrayClass = Class DEFAULT NULL;
)=
DECLARE
newArray = Array;
ENDDECLARE
BEGIN
newArray = Array.Create();
newArray.Row_Class = arrayClass;
RETURN newArray;
END;
Last modified date: 06/25/2024