Single-Element Functions : List of Functions : stm_r_xx

stm_r_xx
Retrieves the element ID of the specified element. This ID is an internal representation that Statemate uses to identify each element in the database. Because Statemate requires the ID to locate elements, this function is very often the first one called when using database exttraction functions.
Function type
Statemate element
For elements
Syntax
stm_r_xx (name, status)
Arguments
Input/Output
This can be an element name (path name) or synonym. Hierarchical elements must be identified uniquely by specifying a unique path name.
The data type of the return value must be declared to be either a Statemate element (STATE, EVENT, and so on) or ELEMENT.
Status Codes
Example
Identify the ID of an event EV1. Once the ID has been determined, you can use it to retrieve information about EV1 from the database, as follows:

VARIABLE
EVENT ev_id;
INTEGER status;
STRING synonym;
.
.
.
ev_id := stm_r_ev (’EV1’, status);
IF status = stm_success
THEN
synonym:= stm_r_ev_synonym (ev_id, status);
.
.
.

The ID for EV1 is assigned to the variable ev_id. Note that ev_id is declared to be of type EVENT.