Skip to content

Commit

Permalink
add proposed clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson committed Nov 8, 2021
1 parent f3d68f6 commit 3609f35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chapters/operatorsandexpressions.tex
Expand Up @@ -1423,7 +1423,7 @@ \subsection{Function Variability}\label{function-variability}
The purity of the function, see \cref{pure-modelica-functions}, does not influence the variability of the function call.

\begin{nonnormative}
The reason the variability ignores whether a function is declared as \lstinline!impure! is that even in this case variability does not depend on the function.
The restrictions for calling functions declared as \lstinline!impure! serve a similar purpose as the variability restrictions, see \cref{pure-modelica-functions}, and thus it is not necessary consider purity in the definition of variability.
Consider a function reading an external file and returning some value from that file.
Different uses can have the file updated before the simulation (as a parameter-expression), or during the simulation (as a discrete-time expression).
Thus it depends on the use case and the specific file, not the function itself, and it would even be possible to update the file in continuous time (as part of an algorithm) and still use the same function.
Expand Down

0 comments on commit 3609f35

Please sign in to comment.