Returns the element name. For hierarchical elements, the function returns the name associated with the box. Because hierarchical elements can share the same name, the return value does not necessarily uniquely identify an element. To return a unique name, use the functionstm_r_xx_uniquename
.
●
This function returns a pointer to a static area of memory. Subsequent calls to this procedure will overwrite the old string. If the name needs to be preserved, use the
strdup()
function from the string library.
●
You can call this function without indicating the specific element type, as follows:
●
For boxes that have no names, this function returns the definition chart name. For example, for box
@ABC
, this function returnsABC
.
VARIABLE
STATE state_id;
INTEGER status;
.
.
state_id := stm_r_st (’S1.S3’,status);
WRITE (stm_r_st_name (state_id, status));
.
.In this example, the state name is provided and this value is used to retrieve the same state name from the database. The purpose of this example is to demonstrate the value returned by this function, in contrast to the value returned by the functionstm_r_xx_uniquename
.