Skip to content

Commit

Permalink
Fix strange uses of \emph for external objects
Browse files Browse the repository at this point in the history
Fixes #2557
  • Loading branch information
henrikt-ma committed Jun 12, 2020
1 parent 5889480 commit 9d8f0dd
Showing 1 changed file with 13 additions and 21 deletions.
34 changes: 13 additions & 21 deletions chapters/functions.tex
Expand Up @@ -2555,35 +2555,27 @@ \subsection{External Objects}\doublelabel{external-objects}
be complete (e.g., from an initial algorithm or initial equation). The
destructor shall delete the object, and must not require any other
calls to be made for the deletion to be complete (e.g., from a \lstinline!when terminal()! clause). The constructor may not assume that pointers sent
to the external object will remain valid for the life-time of the
external object.
to the external object will remain valid for the life-time of the external object. An exception is that if the pointer to another external object is
given as argument to the constructor, that pointer will remain valid as long as the other external object lives.
\begin{nonnormative}
An exception is that if the pointer to another external object is given as argument to the constructor, that pointer will remain valid as long as the other external object lives.
External objects may be a protected component (or part of one) in a function. The constructor is in that case called at the start of the function call,
and the destructor when the function returns, or when recovering from errors in the function.
\end{nonnormative}
\begin{nonnormative}
External objects may be an input (or part of an input) to a function, in that case the destructor is not called (since the external object is active before
and after the function call). Normally this is an external function, but it could be a non-external function as well (e.g.\ calling external functions one
or more times). The function input may not have a default value using the constructor.
\end{nonnormative}

\emph{External objects may be a protected component (or part of one)
in a function. The constructor is in that case called at the start of
the function call, and the destructor when the function returns, or
when recovering from errors in the function.}

\emph{External objects may be an input (or part of an input) to a
function, in that case the destructor is not called (since the
external object is active before and after the function call).
Normally this is an external function, but it could be a non-external
function as well (e.g. calling external functions one or more times).
The function input may not have a default value using the
constructor.}
\item
Classes derived from \lstinline!ExternalObject! can neither be used in an
extends-clause nor in a short class definition.
\item
Only the constructor may return external objects and external object
Only the constructor may return external objects and an external object
can only be bound in component declarations and neither modified later
nor assigned to.

\emph{No function may return a component containing an external object
(since only the constructor may return an external object and the
constructor exactly returns the external object).}
\begin{nonnormative}
It follows that a function cannot return a component containing an external object, since only the constructor may return an external object and the constructor exactly returns the external object.
\end{nonnormative}
\item
External functions may be defined which operate on the internal memory
of an \lstinline!ExternalObject!. An \lstinline!ExternalObject! used as input argument or
Expand Down

0 comments on commit 9d8f0dd

Please sign in to comment.