The by_attributes
function returns all elements in the input list that have an attribute attr_name
, whose value is attr_val
.
The syntax is as follows:
stm_r_xx_by_attributes_
xx (
xx_list, attr_name, attr_val, status)
In this syntax:
●
|
stm_r_—Designates the function as a Statemate database retrieval function.
|
●
|
xx—The two-character type abbreviation for elements in the input and output lists.
|
●
|
by_attributes—The criterion to be met by elements in the input list.
|
●
|
xx_list—The input list to the function.
|
●
|
attr_val—A pattern for the attribute value to be matched.
|
●
|
status—The return function status code. There are three possible status codes: stm_success , stm_nil_list , and stm_missing_element_in_list .
|
For example:
stm_r_md_by_attributes_md (module_list, ’LANGUAGE’,
’PASCAL’, status)
This function returns all modules in module_list
that have an attribute LANGUAGE
, whose value is PASCAL
.