Skip to content

Commit

Permalink
Styling related to 'break' (including 'Connections')
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Oct 12, 2020
1 parent a54a527 commit d4ff9d9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 31 deletions.
3 changes: 1 addition & 2 deletions chapters/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1694,8 +1694,7 @@ \subsubsection{AssertionLevel}\label{assertionlevel}

\subsubsection{Connections}\label{connections}

The package Connections is used for over-constrained connection graphs,
\cref{equation-operators-for-overconstrained-connection-based-equation-systems}.
The package \lstinline!Connections! is used for over-constrained connection graphs, \cref{equation-operators-for-overconstrained-connection-based-equation-systems}.

\subsubsection{Graphical Annotation Types}\label{graphical-annotation-types}

Expand Down
13 changes: 3 additions & 10 deletions chapters/equations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,9 @@ \subsection{Connect-Equations}\label{connect-equations}
connect "(" component-reference "," component-reference ")" ";"
\end{lstlisting}

These can be placed inside for-equations and if-equations; provided the
indices of the for-loop and conditions of the if-clause are parameter
expressions that do not depend on cardinality, rooted,
Connections.rooted, or Connections.isRoot. The
for-equations/if-equations are expanded. Connect-equations are described
in detail in \cref{connect-equations-and-connectors}.

The same restrictions apply to Connections\allowbreak{}.branch, Connections\allowbreak{}.root, and
Connections\allowbreak{}.potentialRoot; which after expansion are handled according
to \cref{equation-operators-for-overconstrained-connection-based-equation-systems1}.
These can be placed inside for-equations and if-equations; provided the indices of the for-loop and conditions of the if-clause are parameter expressions that do not depend on \lstinline!cardinality!, \lstinline!rooted!, \lstinline!Connections.rooted!, or \lstinline!Connections.isRoot!. The for-equations/if-equations are expanded. Connect-equations are described in detail in \cref{connect-equations-and-connectors}.

The same restrictions apply to \lstinline!Connections.branch!, \lstinline!Connections.root!, and \lstinline!Connections.potentialRoot!; which after expansion are handled according to \cref{equation-operators-for-overconstrained-connection-based-equation-systems1}.

\subsection{If-Equations}\label{if-equations}

Expand Down
6 changes: 2 additions & 4 deletions chapters/functions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,13 @@ \subsection{Ordering of Formal Parameters}\label{ordering-of-formal-parameters}

\subsection{Function return-statements}\label{function-return-statements}

The return-statement terminates the current function call, see \cref{function-call}.
It can only be used in an algorithm section of a function. It has
the following form:
The return-statement terminates the current function call, see \cref{function-call}. It can only be used in an algorithm section of a function. It has the following form:
\begin{lstlisting}[language=modelica]
return;
\end{lstlisting}

\begin{example}
(Note that this could alternatively use break:)
(Note that this could alternatively use \lstinline!break!:)
\begin{lstlisting}[language=modelica]
function findValue "Returns position of val or 0 if not found"
input Integer x[:];
Expand Down
14 changes: 3 additions & 11 deletions chapters/revisions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ \subsection{Main changes in Modelica 3.4}\label{main-changes-in-modelica-3-4}
and \cref{stream-operator-instream-and-connection-equations}. Ticket
\href{https://github.com/modelica/ModelicaSpecification/issues/1877}{\#1877}.
\item
Added that Connections is builtin package, \cref{connections}. Ticket
Added that \lstinline!Connections! is builtin package, \cref{connections}. Ticket
\href{https://github.com/modelica/ModelicaSpecification/issues/1883}{\#1883}.
\item
Clarified lookup-order regarding import, \cref{simple-name-lookup}. Ticket
Expand Down Expand Up @@ -878,12 +878,7 @@ \subsection{Main changes in Modelica 3.2 Revision 2}\label{main-changes-in-model
Modelica.Mechanics.MultiBody.World; this feature was also introduced
in Modelica Language version 3.3 in May 2012).
\item
New built-in operator Connections.rooted(A.R) to inquire whether an
overdetermined type or record instance A.R in a call to
Connections.branch(A.R,B.R) is closer to the root of the spanning tree
than B.R, \cref{overconstrained-equation-operators-for-connection-graphs} (used in MSL 3.2 to avoid algebraic loops in
several components such as in
Modelica.Mechanics.MultiBody.Joints.Revolute).
New built-in operator \lstinline!Connections.rooted(A.R)! to inquire whether an overdetermined type or record instance \lstinline!A.R! in a call to \lstinline!Connections.branch(A.R, B.R)! is closer to the root of the spanning tree than \lstinline!B.R!, \cref{overconstrained-equation-operators-for-connection-graphs} (used in MSL 3.2 to avoid algebraic loops in several components such as in Modelica.Mechanics.MultiBody.Joints.Revolute).
\item
Several new annotations where vendor-specific variants were used in
MSL 3.2; \cref{annotation-choices-for-suggested-redeclarations-and-modifications},
Expand Down Expand Up @@ -2102,10 +2097,7 @@ \subsection{Main Changes in Modelica 2.1}\label{main-changes-in-modelica-2-1}
\end{itemize}
Fixing some minor errors in the grammar and semantic specification.

The language changes are backward compatible, except for the
introduction of the new keywords break and return, the new built-in
package Connections and the removing of built-in function and attribute
\lstinline!enable!.
The language changes are backward compatible, except for the introduction of the new keywords \lstinline!break! and \lstinline!return!, the new built-in package \lstinline!Connections! and the removing of built-in function and attribute \lstinline!enable!.

\section{Modelica 2.0}\label{modelica-2-0}

Expand Down
5 changes: 1 addition & 4 deletions chapters/statements.tex
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,7 @@ \subsection{While-Statement}\label{while-statement}

\subsection{Break-Statement}\label{break-statement}

The break-statement breaks the execution of the innermost while or
for-loop enclosing the break-statement and continues execution after the
while- or for-loop. It can only be used in a while- or for-loop in an
algorithm section. It has the following syntax:
The break-statement breaks the execution of the innermost while- or for-loop enclosing the break-statement and continues execution after the while- or for-loop. It can only be used in a while- or for-loop in an algorithm section. It has the following syntax:
\begin{lstlisting}[language=modelica]
break;
\end{lstlisting}
Expand Down

0 comments on commit d4ff9d9

Please sign in to comment.