Skip to content

Commit

Permalink
Say 'Error', not 'Not allowed' in listing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Jun 26, 2020
1 parent deae32e commit 0ea63e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion chapters/classes.tex
Expand Up @@ -901,7 +901,7 @@ \section{Specialized Classes}\doublelabel{specialized-classes}
end '*';
end Complex;
record MyComplex
extends Complex; // not allowed, since extending from enclosing scope
extends Complex; // Error; extending from enclosing scope.
Real k;
end MyComplex;
operator record ComplexVoltage = Complex(re(unit="V"),im(unit="V")); // allowed
Expand Down
13 changes: 4 additions & 9 deletions chapters/connectors.tex
Expand Up @@ -228,7 +228,7 @@ \subsection{Expandable Connectors}\doublelabel{expandable-connectors}
import Interfaces=Modelica.Electrical.Analog.Interfaces;
expandable connector ElectricalBus
Interfaces.PositivePin p12, n12; // OK
flow Modelica.Units.SI.Current i; // not allowed
flow Modelica.Units.SI.Current i; // Error
end ElectricalBus;

model Battery
Expand Down Expand Up @@ -259,14 +259,9 @@ \subsection{Expandable Connectors}\doublelabel{expandable-connectors}
EmptyBus bus2;
RealInput speed;
equation
connect(speed, bus1.speed); // ok, only one undeclared
// and it is unsubscripted

connect(bus1.pressure, bus2.pressure);
// not allowed, both undeclared

connect(speed, bus2.speed[2]);
// introduces speed array (with element [2]).
connect(speed, bus1.speed); // OK; only one undeclared and not subscripted.
connect(bus1.pressure, bus2.pressure); // Error; both undeclared.
connect(speed, bus2.speed[2]); // Introduces speed array (with element [2]).
end Controller;
\end{lstlisting}
\end{example}
Expand Down

0 comments on commit 0ea63e7

Please sign in to comment.