Utility Functions : List of Utility Functions : stm_list_first_id_element

stm_list_first_id_element
Returns the first item appearing in the list passed as an input argument. This function may be applied to lists containing Rational Statemate ids.
Function Type
stm_list_id_elm
Syntax
stm_list_first_id_element (list, &status)
Arguments
Input/Output
Status Codes
Example
To find out which activity in the list of activities assigned to the variable act_list is a control activity, use the following statements:

stm_list cntrl_act_list, act_list;
stm_id cntrl_act;
int status;
.
.
cntrl_act_list = stm_ac_control_ac (act_list, &status);
cntrl_act = (stm_id)
stm_list_first_id_element (cntrl_act_list, &status);
.
.

First, extract all control activities from the input list act_list. The list cntrl_act_list consists of only one element. Extract the first element (in this case the only element) of the list and assign this control activity’s ID to cntrl_act.