Returns the next item appearing in the list passed as an input argument. This function can be applied to lists containing stm_list_id_elm’s..
Input/Output Items in the input list must be stm_list_id_elm’s. To find the next element in the list of states,S1
,S2
,S3
, andS4
(appearing in this order) assigned to the variablestate_list
, use the following statements:stm_list state_list;
stm_id state_id;
int status;
.
.
state_id = (stm_id) stm_list_first_id_element (
state_list, &status);
printf ("The first state in the list is: %s\n",
stm_r_st_name (state_id, &status));
state_id = (stm_id) stm_list_next_id_element (state_list,
&status);
printf ("The second state in the list is: %s\n",
stm_r_st_name (state_id, &status));
.
.This function can be used in afor
loop (in conjunction withstm_list_first_id_element
) to perform operations on all elements in the list