Utility Functions : Utility Function Examples : Example 2

Example 2

To return the activity from Example 1, which is the control activity, use the following statements:

.
.
.
cntrl_act_list = stm_ac_control_ac (act_list &status);
cntrl_act = (stm_id)stm_list_first_element
(cntrl_act_list, &status);
.
.
.
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.