Utility Functions : List of Utility Functions : stm_list_last_id_element

stm_list_last_id_element
Function Type
stm_list_id_elm
Description
Returns the last item appearing in the list passed as an input argument. This function can be applied to lists containing stm_id’s.
Syntax
stm_list_last_id_element (list, &status)
Arguments
Input/Output
 
Status Codes
Example
To find the last item in the list of states, S1, S2, S3, and S4 assigned to the variable state_list, use the following statements:

 

stm_list state_list;
stm_id state_id;
int status;
.
.
state_id = (stm_id) stm_list_last_id_element (state_list,
&status);
printf ("The last state in the list is: %s\n",
stm_r_st_name (state_id, &status));
.
.