Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify that component references work in this form. #3592

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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