Single-Element Functions : List of Functions : stm_r_xx_type

stm_r_xx_type
Retrieves element subtypes for the specified element. Most Statemate elements are divided into classes, referred to as subtypes. For example, a state might belong to one of a number of subtypes, such as and, or, basic, diagram, instance, or reference.
You can call this function without indicating the specific element type, as follows:

stm_r_type (id, status)

Function type
INTEGER (predefined constant)
For elements
Syntax
stm_r_xx_type (xx_id, status)
Arguments
Status Codes
Return Values
Although the return value of this function is of type INTEGER, the Documentor enables you to refrence this value by name. The name is internally defined as a predefined constant in DGL. The following table lists the possible values:
Example
To retrieve the type of state READY and execute some statements if the state is an or state, use the following statements:

VARIABLE
STATE st_id;
INTEGER st_type;
INTEGER status;
.
.
.
st_id := stm_r_st (’READY’, status);
st_type := stm_st_type (st_id, status);
IF st_type = stm_st_or THEN
.
.
.

If READY is an or-state, the statements following THEN are executed.