- Function SectionIdentifiers(SectionName)
SectionIdentifiers
The function SectionIdentifiers
determines which identifiers are
declared within a specific section in the model tree.
SectionIdentifiers(
SectionName ! (input) scalar element parameter
)
Arguments
- SectionName
An element expression in the set
AllSections
specifying the section for which the identifiers should be listed.
Return Value
This function returns a subset of
AllIdentifiers
containing all the identifiers that are declared within the specified section, excluding the section itself and its prefix (if the section is a module or library). WhenSectionName
is the empty element, the empty set is returned.
Example
Given the declarations:
Parameter p1;
Parameter p2;
Parameter pd {
Definition: p1 + p2;
}
The following code collects all identifiers referenced in a section, includining the procedure.
1_ep_sec := StringToElement(AllIdentifiers,
2 "chapterModel::sectionModelQuery::Function_SectionIdentifiers",
3 create:0);
4_s_refIds := SectionIdentifiers(_ep_sec);
5block where single_column_display := 1, listing_number_precision := 6 ;
6 display _s_refIds ;
7endblock ;
produces in the listing file:
_s_refIds := data
{ 'chapterModel::sectionModelQuery::funcSectionIdentifiers::pr_testSectionIdentifiers',
'chapterModel::sectionModelQuery::funcSectionIdentifiers::p1' ,
'chapterModel::sectionModelQuery::funcSectionIdentifiers::p2' ,
'chapterModel::sectionModelQuery::funcSectionIdentifiers::pd' } ;