Skip to content

Commit

Permalink
No deduction of iterator range from array in bus
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson committed Jun 18, 2020
1 parent 59d768b commit 13b9809
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion chapters/statements.tex
Expand Up @@ -217,7 +217,8 @@ \subsubsection{Implicit Iteration Ranges}\doublelabel{implicit-iteration-ranges}

An iterator \lstinline!IDENT in range-expr! without the \lstinline!in range-expr! requires that
the \lstinline!IDENT! appears as the subscript of one or several subscripted
expressions. The dimension size of the array expression in the indexed
expressions - that are not part of an array in a component of an expandable connector.
The dimension size of the array expression in the indexed
position is used to deduce the \lstinline!range-expr! as
\lstinline!1:size(array-expression,indexpos)! if the indices are a subtype of
Integer, or as \lstinline!E.e1:E.en! if the indices are of an enumeration type
Expand All @@ -228,6 +229,9 @@ \subsubsection{Implicit Iteration Ranges}\doublelabel{implicit-iteration-ranges}
for-equation, occur freely outside of subscript positions, but only as a
reference to the variable \lstinline!IDENT!, and not for deducing ranges.

The \lstinline!IDENT! may also be used as a subscript for an array in a component of an expandable connector
but it is only seen as a reference to the variable \lstinline!IDENT! and cannot be used for deducing ranges.

\begin{example}
\begin{lstlisting}[language=modelica]
Real x[4];
Expand Down

0 comments on commit 13b9809

Please sign in to comment.