Skip to content

Commit

Permalink
Merge pull request #3592 from HansOlsson/ClarifyCompText
Browse files Browse the repository at this point in the history
Clarify that component references work in this form.
  • Loading branch information
HansOlsson authored Nov 6, 2024
2 parents 26b3662 + 267ebfc commit a285934
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions chapters/annotations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1096,8 +1096,9 @@ \subsubsection{Text}\label{text}
\begin{example}
If \lstinline!par = "Modelica.Blocks.Types.Enumeration.Periodic"!, then \%\emph{par} should be displayed as \emph{Periodic}.
\end{example}
When quoted identifiers (e.g., \lstinline!rec.'}'.'quoted ident'!) are involved, the form \%\{\emph{par}\} must be used.
Here, \emph{par} is a general \lstinline[language=grammar]!component-reference!, and the macro can be directly followed by a letter.
When quoted identifiers (e.g., \lstinline!rec.'}'.'quoted ident'!) or composite names (i.e., not simple identifiers) are involved, the form \%\{\emph{par}\} must be used.
Here, \emph{par} is a general \lstinline[language=grammar]!component-reference!, and \lstinline!%{a.p}! gives the value of the parameter \lstinline!p! in the component \lstinline!a!.
The macro can be directly followed by a letter.
Thus \lstinline!%{w}x%{h}! gives the value of \lstinline!w! directly followed by \emph{x} and the value of \lstinline!h!, while \lstinline!%wxh! gives the value of the parameter \lstinline!wxh!.
If the parameter does not exist it is an error.
\end{itemize}
Expand Down

0 comments on commit a285934

Please sign in to comment.