Skip to content

Commit

Permalink
Clarify that "final x=break" cannot be overriden.
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson committed Dec 13, 2022
1 parent e0bd3cb commit c320a71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chapters/inheritance.tex
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ \subsection{Removing Modifiers -- break}\label{removing-modifiers-break}
The modifiers using \lstinline!break! are merged using the same rule as other modifications, and follow the same restrictions so they cannot override a final modifier.
During flattening of an instantiated model, remaining \lstinline!break! modifications (i.e., the ones that are not further overriden) are treated as if the expression was missing.
The \lstinline!break! modifier for a variable of a simple type can be applied to the value and/or to specific attributes.
It is possible to override even if no value is present, either because there was no expression originally or because \lstinline!break! overrides another \lstinline!break!.
Unless \lstinline!final! was specified, it is possible to override even if no value is present, either because there was no expression originally or because \lstinline!break! overrides another \lstinline!break!.

\begin{nonnormative}
In a dialog, a tool may hide the keyword \lstinline!break! and show an empty input field, without the overriden modification.
Expand Down Expand Up @@ -612,7 +612,7 @@ \subsection{Removing Modifiers -- break}\label{removing-modifiers-break}
end A;

model B "Initial equation for diameter"
extends A( diameter(fixed = false) = break );
extends A( final diameter(fixed = false) = break );
parameter Real square=2;
initial equation
// solving equation below for diameter
Expand All @@ -626,7 +626,7 @@ \subsection{Removing Modifiers -- break}\label{removing-modifiers-break}
end A;

model B "Computing x instead"
extends A(x=break);
extends A(final x=break);
algorithm
x:=0;
while ...
Expand Down

0 comments on commit c320a71

Please sign in to comment.