From 9ae02db134015b218d86f9a34320c3f7e498a990 Mon Sep 17 00:00:00 2001 From: HOS Date: Fri, 30 Aug 2024 14:16:29 +0200 Subject: [PATCH] Sensible quoting. --- chapters/packages.tex | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chapters/packages.tex b/chapters/packages.tex index efb1d1cce..cb64d0a1f 100644 --- a/chapters/packages.tex +++ b/chapters/packages.tex @@ -145,7 +145,7 @@ \section{The Modelica Library Path -- MODELICAPATH}\label{the-modelica-library-p If during lookup a top-level name is not found in the unnamed top-level scope, the search continues in the package hierarchies stored in these directories. \begin{example} -\Cref{fig:roots} below shows an example \lstinline!MODELICAPATH! = \filename{"C:\textbackslash{}library;C:\textbackslash{}lib1;C:\textbackslash{}lib2"}, with three directories containing the roots of the package hierarchies \lstinline!Modelica!, \lstinline!MyLib!, and \lstinline!ComplexNumbers!. +\Cref{fig:roots} below shows an example \lstinline!MODELICAPATH! = \filename{C:\textbackslash{}library;C:\textbackslash{}lib1;C:\textbackslash{}lib2}, with three directories containing the roots of the package hierarchies \lstinline!Modelica!, \lstinline!MyLib!, and \lstinline!ComplexNumbers!. The first two are represented as the subdirectories \filename{C:\textbackslash{}library\textbackslash{}Modelica} and \filename{C:\textbackslash{}lib1\textbackslash{}MyLib}, whereas the third is stored as the file \filename{C:\textbackslash{}lib2\textbackslash{}ComplexNumbers.mo}. \begin{figure}[H] @@ -153,7 +153,7 @@ \section{The Modelica Library Path -- MODELICAPATH}\label{the-modelica-library-p \includegraphics{modelicapath} \end{center} \caption{Roots of package hierarchies, e.g., \lstinline!Modelica!, \lstinline!MyLib!, and \lstinline!ComplexNumbers! in - \lstinline!MODELICAPATH! = \filename{"C:\textbackslash{}library;C:\textbackslash{}lib1;C:\textbackslash{}lib2"}.} + \lstinline!MODELICAPATH! = \filename{C:\textbackslash{}library;C:\textbackslash{}lib1;C:\textbackslash{}lib2}.} \label{fig:roots} \end{figure} @@ -171,6 +171,8 @@ \section{The Modelica Library Path -- MODELICAPATH}\label{the-modelica-library-p This subdirectory must have a file \filename{package.mo} containing a definition of the package \lstinline!MyLib!, according to the Modelica rules on how to map a package hierarchy to the file system. The subpackage \lstinline!Pack2! is stored in its own subdirectory or file in the subdirectory \filename{MyLib}. In this case the search succeeds and the package \lstinline!MyLib.Pack2! is loaded into the environment. + +Note that if you use the environment variable \lstinline!MODELICAPATH! in Modelica the value is a string which implies that it is quoted, i.e., \lstinline!"C:\\library;C:\\lib1;C:\\lib2"!. \end{example}