Single-Element Functions : List of Functions : stm_r_element_type

stm_r_element_type
Returns the element type of the specified element.
Function type
INTEGER (predefined constant)
For elements
All types
Syntax
stm_r_element_type (id, status)
Arguments
Status Codes
Return Values
Although the return value of this function is of type INTEGER, the Documentor enables you to reference this value by name. The name is defined internally as a predefined constant in DGL. each element type has an associated predefined value, as shown in the following table:
Example
The sample template performs the following tasks:

Generates a list of elements (of type MIXED) using stm_r_mx_in_definition_of_co. Elements in this list are all elements (not necessarily conditions) appearing in the definition field of the condition C1.

Searches this list for conditions. If any are found, it prints them in the document.

VARIABLE
CONDITION cond_id;
LIST OF ELEMENT elmnt_list;
ELEMENT el;
INTEGER status, el_type;
.
.
.
cond_id := stm_r_co (’C1’, status);
elmnt_list := stm_r_mx_in_definition_of_co ({cond_id}, status);
FOR el IN elmnt_list LOOP
el_type := stm_r_element_type (el, status);
IF el_type = stm_condition THEN
WRITE (’\n Condition Name:’, stm_r_co_name(
el, status));
END IF;
END LOOP;
.
.
.