From 13b98097920a31d1b317d18abcd18edc2895d840 Mon Sep 17 00:00:00 2001 From: OLSSON Hans Date: Thu, 18 Jun 2020 16:14:17 +0200 Subject: [PATCH] No deduction of iterator range from array in bus Resolve #2560 --- chapters/statements.tex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chapters/statements.tex b/chapters/statements.tex index 7ec4341cb..2c6e1be39 100644 --- a/chapters/statements.tex +++ b/chapters/statements.tex @@ -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 @@ -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];