Skip to content

Commit

Permalink
Cleanup related to upper camel case identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Oct 14, 2020
1 parent a7f55f4 commit 4fea2eb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 31 deletions.
8 changes: 2 additions & 6 deletions chapters/annotations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -757,13 +757,9 @@ \subsubsection{Text}\label{text}
TextAlignment horizontalAlignment = TextAlignment.Center;
end Text;
\end{lstlisting}
The \lstinline!textColor! attribute defines the color of the text. The text is drawn
with transparent background and no border around the text (and without
outline). The contents inherited from \lstinline!FilledShape! is deprecated, but kept for compatibility reasons.
The \lstinline!textColor! attribute defines the color of the text. The text is drawn with transparent background and no border around the text (and without outline). The contents inherited from \lstinline!FilledShape! is deprecated, but kept for compatibility reasons.

There are a number of common macros that can be used in the text, and
they should be replaced when displaying the text as follows (in order such that the earliest ones have precedence,
and using the longest sequence of identifier characters - alphanumeric and underscore):
There are a number of common macros that can be used in the text, and they should be replaced when displaying the text as follows (in order such that the earliest ones have precedence, and using the longest sequence of identifier characters -- alphanumeric and underscore):

\begin{itemize}
\item
Expand Down
17 changes: 7 additions & 10 deletions chapters/overloaded.tex
Original file line number Diff line number Diff line change
Expand Up @@ -497,20 +497,17 @@ \section{Example of Overloading for Complex Numbers}\label{example-of-overloadin
p1.i + p2.i + p3.i = Complex.'0'();
// Complex.'+'(p1.i, Complex.'+'(p2.i, p3.i)) = Complex.'0'();
\end{lstlisting}
The restrictions on extends are intended to avoid combining two
variants inheriting from the same operator record, but with possibly
different operations; thus ComplexVoltage and ComplexCurrent still use
the operations from Complex. The restriction that it is not legal to
extend from any of its enclosing scopes implies that:
The restrictions on extends are intended to avoid combining two variants inheriting from the same operator record, but with possibly different operations; thus \lstinline!ComplexVoltage! and \lstinline!ComplexCurrent! still use the operations from \lstinline!Complex!. The restriction that it is not legal to extend from any of its enclosing scopes implies that:
\begin{lstlisting}[language=modelica]
package A
extends Icon; // Ok
operator record B $\ldots$ end B;
end A;
end A;

package A2
extends A($\ldots$); // Not legal
end A2;
package A3=A($\ldots$); // Not legal
package A2
extends A($\ldots$); // Not legal
end A2;

package A3 = A($\ldots$); // Not legal
\end{lstlisting}
\end{example}
18 changes: 6 additions & 12 deletions chapters/revisions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ \subsection{Main changes in Modelica 3.4}\label{main-changes-in-modelica-3-4}
Made the different Text-annotations more similar, \cref{connections}.
Ticket \href{https://github.com/modelica/ModelicaSpecification/issues/1621}{\#1621}.
\item
Clarified LinePatterns in \cref{graphical-primitives}. Ticket
\href{https://github.com/modelica/ModelicaSpecification/issues/1483}{\#1483}.
Clarified \lstinline!LinePattern! in \cref{graphical-primitives}.
Ticket \href{https://github.com/modelica/ModelicaSpecification/issues/1483}{\#1483}.
\item
Corrected flipping of components and bitmaps, and clarified various
aspects of bitmaps, \cref{component-instance} and \cref{bitmap}. Ticket
Expand Down Expand Up @@ -864,11 +864,9 @@ \subsection{Main changes in Modelica 3.2 Revision 2}\label{main-changes-in-model
\begin{itemize}
\item
Possible to call a function through an instance name, \cref{composite-name-lookup}\\
(used in MSL 3.2 to compute the gravity acceleration in
Modelica.Mechanics.MultiBody.World; this feature was also introduced
in Modelica Language version 3.3 in May 2012).
(used in MSL 3.2 to compute the gravity acceleration in \lstinline!Modelica.Mechanics.MultiBody.World!; this feature was also introduced in Modelica Language version 3.3 in May 2012).
\item
New built-in operator \lstinline!Connections.rooted(A.R)! to inquire whether an overdetermined type or record instance \lstinline!A.R! in a call to \lstinline!Connections.branch(A.R, B.R)! is closer to the root of the spanning tree than \lstinline!B.R!, \cref{overconstrained-equation-operators-for-connection-graphs} (used in MSL 3.2 to avoid algebraic loops in several components such as in Modelica.Mechanics.MultiBody.Joints.Revolute).
New built-in operator \lstinline!Connections.rooted(A.R)! to inquire whether an overdetermined type or record instance \lstinline!A.R! in a call to \lstinline!Connections.branch(A.R, B.R)! is closer to the root of the spanning tree than \lstinline!B.R!, \cref{overconstrained-equation-operators-for-connection-graphs} (used in MSL 3.2 to avoid algebraic loops in several components such as in \lstinline!Modelica.Mechanics.MultiBody.Joints.Revolute!).
\item
Several new annotations where vendor-specific variants were used in
MSL 3.2; \cref{annotation-choices-for-suggested-redeclarations-and-modifications},
Expand Down Expand Up @@ -1161,11 +1159,7 @@ \subsection{Main changes in Modelica 3.2}\label{main-changes-in-modelica-3-2}
system where the type is only defined by the public elements). Overloaded operators can only be defined inside an \lstinline!operator record!. This change fixes a flaw in Modelica~3.1, since
the look-up of overloaded operators is performed by the record class name.
\item
Inheritance of an \lstinline!operator record! is allowed if defined via a
short class definition. This removes a restriction of operator
overloading in Modelica 3.1, e.g., to define derived classes with
units for the record elements, like deriving ComplexVoltage from
Complex.
Inheritance of an \lstinline!operator record! is allowed if defined via a short class definition. This removes a restriction of operator overloading in Modelica 3.1, e.g., to define derived classes with units for the record elements, like deriving \lstinline!ComplexVoltage! from \lstinline!Complex!.
\item
New overloaded element \lstinline!'0'! in order that operator record classes can
be used as flow variables in connectors.
Expand Down Expand Up @@ -1445,7 +1439,7 @@ \subsection{Main changes in Modelica 3.1}\label{main-changes-in-modelica-3-1}
\item
Example of using fields was corrected.
\item
Example with MatrixGain was corrected.
Example with \lstinline!MatrixGain! was corrected.
\item
Ambiguous annotations after external-clause were corrected (as already used).
\item
Expand Down
5 changes: 2 additions & 3 deletions chapters/synchronous.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1106,8 +1106,7 @@ \subsection{Solver Methods}\label{solver-methods}
"discretized continuous-time partition."
\end{lstlisting}

If a tool supports one of the integrators of SolverMethod, it must use
the solver method name of above.
If a tool supports one of the integrators of \lstinline!SolverMethod!, it must use the solver method name of above.

\begin{nonnormative}
A tool may support also other integrators. Typically, a tool supports at least methods \lstinline!"External"! and \lstinline!"ExplicitEuler"!. If a tool does not support the
Expand Down Expand Up @@ -1217,7 +1216,7 @@ \subsection{Solver Methods}\label{solver-methods}
equation
der(x) = -x + u
\end{lstlisting}
shall be transformed to a clocked discretized continuous-time partition with the ExplicitEuler method. The following model is a manual implementation:
shall be transformed to a clocked discretized continuous-time partition with the \lstinline!"ExplicitEuler"! method. The following model is a manual implementation:
\begin{lstlisting}[language=modelica]
input Real u;
parameter Real x_start = 1;
Expand Down

0 comments on commit 4fea2eb

Please sign in to comment.