Skip to content

Commit

Permalink
Add 'assert' and 'terminate' to index
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Dec 1, 2020
1 parent 11ef315 commit 1c66ea5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
13 changes: 4 additions & 9 deletions chapters/equations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ \subsection{reinit}\label{reinit}

\subsection{assert}\label{assert}

An equation or statement of one of the following forms is an assertion:
An equation or statement of one of the following forms is an assertion\index{assert@\indexinline{assert}!equation}:
\begin{lstlisting}[language=modelica]
assert(condition, message); // Uses level=AssertionLevel.error
assert(condition, message, assertionLevel);
Expand Down Expand Up @@ -509,14 +509,9 @@ \subsection{assert}\label{assert}

\subsection{terminate}\label{terminate}

The \lstinline!terminate! equation or statement (using function
syntax) successfully terminates the analysis which was carried out,
see also \cref{assert}. The termination is not immediate at the place
where it is defined since not all variable results might be available
that are necessary for a successful stop. Instead, the termination
actually takes place when the current integrator step is successfully
finalized or at an event instant after the event handling has been
completed before restarting the integration.
The \lstinline!terminate!\index{terminate@\indexinline{terminate}!equation} equation or statement (using function syntax) successfully terminates the analysis which was carried out, see also \cref{assert}.
The termination is not immediate at the place where it is defined since not all variable results might be available that are necessary for a successful stop.
Instead, the termination actually takes place when the current integrator step is successfully finalized or at an event instant after the event handling has been completed before restarting the integration.

The \lstinline!terminate! statement has a string argument indicating the reason for the success.

Expand Down
4 changes: 2 additions & 2 deletions chapters/statements.tex
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,8 @@ \subsection{Special Statements}\label{special-statements}

\subsubsection{Assert Statement}\label{assert-statement}

See \cref{assert}. A failed \lstinline!assert! stops the execution of the current algorithm.
See \cref{assert}. A failed \lstinline!assert!\index{assert@\indexinline{assert}!statement} stops the execution of the current algorithm.

\subsubsection{Terminate Statement}\label{terminate-statement}

See \cref{terminate}. The \lstinline!terminate! statement shall not be in functions. In an algorithm outside a function it does not stop the execution of the current algorithm.
See \cref{terminate}. The \lstinline!terminate!\index{terminate@\indexinline{terminate}!statement} statement shall not be in functions. In an algorithm outside a function it does not stop the execution of the current algorithm.

0 comments on commit 1c66ea5

Please sign in to comment.