From 389ad163f05da27d850e8bf2cd846ab21cbfefad Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Tue, 16 Aug 2022 14:46:32 +0200 Subject: [PATCH] Fix hard-coded references in listing --- chapters/functions.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chapters/functions.tex b/chapters/functions.tex index 688e4b0cf..70fc5ffca 100644 --- a/chapters/functions.tex +++ b/chapters/functions.tex @@ -619,7 +619,7 @@ \subsubsection{Function Partial Application}\label{function-partial-application} \begin{example} Function partial application of a function that is a component, according to case~\ref{functional-argument:component-partial-application} above: -\begin{lstlisting}[language=modelica] +\begin{lstlisting}[language=modelica,escapechar=!] partial function SurfaceIntegrand input Real x; input Real y; @@ -634,7 +634,7 @@ \subsubsection{Function Partial Application}\label{function-partial-application} output Real z; algorithm z := quadrature(y1, y2, function integrand(y = x)); - // This is according to case (d) and needs to bind the 2nd argument + // This is according to case !\ref{functional-argument:component-partial-application}! and needs to bind the 2nd argument end quadratureOnce; function surfaceQuadrature @@ -648,7 +648,7 @@ \subsubsection{Function Partial Application}\label{function-partial-application} integral := quadrature(x1, x2, function quadratureOnce(y1 = y1, y2 = y2, integrand = integrand)); - // Case (b) and (c) + // Case !\ref{functional-argument:partial-application}! and !\ref{functional-argument:component}! end surfaceQuadrature; \end{lstlisting} \end{example}