The following example shows how to find the software modules in a list of modules:
VARIABLE
MODULE md_id;
LIST OF STRING imp_type;
INTEGER status;
.
.
imp_type := stm_r_md_attr_val (md_id, ’IMPLEMENTATION’,
status);
IF stm_list_contains_string (imp_type, ’SOFTWARE’,
status)
THEN
.
.First, the code finds all the values for the
IMPLEMENTATION
attribute for the module,md_id
. Among these values, the code searches for the valueSOFTWARE
. (Multiple values can exist for a given attribute.) If it is found, the statements followingTHEN
are executed.