Skip to content

Commit

Permalink
Trying to handle restriction for components of various specialized cl…
Browse files Browse the repository at this point in the history
…asses.

Closes modelica#2235
  • Loading branch information
HansOlsson committed Feb 12, 2020
1 parent f6e3377 commit edeeb74
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions chapters/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -817,9 +817,7 @@ \section{Specialized Classes}\doublelabel{specialized-classes}
of a record may not have prefixes \lstinline!input!, \lstinline!output!,
\lstinline!inner!, \lstinline!outer!, \lstinline!stream,!
or \lstinline!flow!. Enhanced with implicitly available record constructor function,
see \autoref{record-constructor-functions}. Additionally, record components can be used as
component references in expressions and in the left hand side of
assignments, subject to normal type compatibility rules. The components
see \autoref{record-constructor-functions}. The components
directly declared in a record may only be of specialized class record
and type.\\ \hline
\lstinline!type! & May only be predefined types, enumerations, array of
Expand Down Expand Up @@ -877,6 +875,12 @@ \section{Specialized Classes}\doublelabel{specialized-classes}
\end{lstlisting}
{]}\\ \hline
\end{longtable}
Additionally only components of specialized classes \lstinline!record!, \lstinline!type!, \lstinline!operator record!, and
connector classes based on any of those can be used as component references in normal expressions and in the left hand
side of assignments, subject to normal type compatibility rules.
Additionally components of connectors may be arguments of connect-statements,
and any component can be used as argument to the \lstinline!ndims! and \lstinline!size!-functions, or for accessing
elements of that component (possibly in combination with array indexing).
{[}\emph{Example for ''operator'': }
\begin{lstlisting}[language=modelica]
Expand Down

0 comments on commit edeeb74

Please sign in to comment.