Single-Element Functions : List of Functions : stm_r_xx_attr_name

stm_r_xx_attr_name
Returns the names of attributes associated with the specified element. Attributes are associated with elements via element forms.
You can call this function without indicating the specific element type, as follows:

stm_r_attr_name (id, &status)

Function Type
stm_list
For Elements
Syntax
stm_r_xx_attr_name (xx_id, &status)
Arguments
 
Input/Output
If no attributes exist for the specified element, status receives the value stm_attribute_name_not_found.
Status Codes
Example
To perform operations on the attributes of the state WAIT, retrieve a list of its attribute names using the following statements:

stm_id st_id;
stm_attr_name attrib;
stm_list attr_list;
int status;
.
.
st_id = stm_r_st ("WAIT", &status);
attr_list = stm_r_st_attr_name (st_id, &status);
for (attrib = (stm_attr_name)
stm_list_first_element (attr_list, &status);
status == stm_success;
attrib = (stm_attr_name)
stm_list_next_element (attr_list, &status))
.
.
.
attr_list contains a list of attribute names for WAIT. In the for loop, perform the operations on each item in the list of attributes (such as retrieving and printing the corresponding values).