Suppose you want to find the synonym and the short description for a state
S1
, as they appear in the state’s form. Assume that the path nameSSS
.S1
uniquely identifies the state. Include the following code in your Documentor template:VARIABLE
STATE state_id;
STRING state_desc, state_syn;
INTEGER status;
.
.
state_id := stm_r_st (’SSS.S1’, status);
state_syn := stm_r_st_synonym (state_id, status);
state_desc:= stm_r_st_description (state_id, status);
.
.
This example uses two consecutive function calls to extract first the synonym, then the short description of the same element. The assigned variable and the function return value must have compatible data types. Therefore,
state_id
is declared asSTATE
. (state_id
could also be declared asELEMENT
.)