Query Functions : Calling Query Functions : Name and Synonym Patterns

Name and Synonym Patterns

The name_of and synonym_of functions search the entire database for elements whose name (or synonym) matches the pattern specified in the argument pattern.

The syntax is as follows:

stm_r_xx_name_of_xx (pattern, &status)
 
stm_r_xx_synonym_of_xx (pattern, &status)
 

In this syntax:

stm_r_—Designates the function as a Rational Statemate database retrieval function
xx—The two-character type abbreviation of elements in the output list
name_of or synonym_of—The criterion to be met (specifies that the query “Element whose name matches a pattern” or “Element whose synonym matches a pattern” is to be applied)
pattern—A character string you supply as an input argument
status—The return function status code

These functions search the entire database for elements whose names (or synonyms) match the pattern specified in the argument pattern.

For example:

stm_r_ev_name_of_ev ("EV*", &status)
 

This function returns all events from the database whose names begin with the string EV.

In another example, to retrieve all the charts in the database use the following:

stm_r_ch_name_of_ch ("*", &status)
 

The output list contains all the charts in the database, including reference charts.