diff --git a/chapters/functions.tex b/chapters/functions.tex index f82c478ba..09c59571b 100644 --- a/chapters/functions.tex +++ b/chapters/functions.tex @@ -1746,10 +1746,12 @@ \section{Function Inlining and Event Generation}\label{function-inlining-and-eve \begin{semantics} Has only an effect within a function declaration. -By default, {\lstinline!GenerateEvents = false!} and expressions in the function body that would normally be event-generating shall not generate events, similar to inlining the function body while wrapping all expressions in {\lstinline!noEvent!}, see \cref{modelica:noEvent}. +By default, {\lstinline!GenerateEvents = false!} and expressions in the function body that would normally be event generating shall not generate events, similar to inlining the function body while wrapping all expressions in {\lstinline!noEvent!}, see \cref{modelica:noEvent}. By specifying {\lstinline!GenerateEvents = true!}, event-generating expressions in the function body shall generate events as normal, similar to inlining the function body without wrapping all expressions in {\lstinline!noEvent!}. Having {\lstinline!GenerateEvents = true!} implies {\lstinline!Inline = true!} unless overridden by specifying one of the inlining annotations with value {\lstinline!true!} (in particular, {\lstinline!GenerateEvents = true!} cannot be combined with {\lstinline!Inline = false!}). +A function with \lstinline!GenerateEvents = true! should be considered event generating for purposes of determining where the function may be called, regardless of whether the function body contains any expressions which could actually generate events. + \begin{nonnormative} In case a given inlining annotation proposes to inline at a stage when the tool cannot process {\lstinline!GenerateEvents = true!}, it is recommended to give a diagnostic and instead perform inlining of the function at the nearest stage where {\lstinline!GenerateEvents = true!} can still be respected.