- Function IdentifierText(identifierName)
IdentifierText
The function IdentifierText
returns the string representation of the text attribute of identifierName
or, if the text is not specified, the name of the identifier.
IdentifierText(
identifierName) ! (input) scalar element parameter
Arguments
- identifierName
An element expression in the predefined set
AllIdentifiers
specifying the identifier for which the text should be obtained.
Return Value
This function returns a string containing the text attribute of
identifierName
. IfidentifierName
is not an identifier, an error message is issued. When the text is not specified, the name of the identifier is returned.
Note
This function replaces the deprecated suffix .txt.
Example
Given the declaration:
Parameter p_d {
Text: "a scalar";
}
the code:
1_ep_p := StringToElement(AllIdentifiers,
2 "chapterModel::sectionModelQuery::funcIdentifierText::p_d",
3 create: 0);
4_sp_txt := IdentifierText( _ep_p );
5block where single_column_display := 1, listing_number_precision := 6 ;
6 display _sp_txt ;
7endblock ;
produces in the listing file:
_sp_txt := "a scalar" ;
References
The functions
IdentifierText
.Working with the Set AllIdentifiers of the Language Reference.
The common example in Listing 1.