From 1521e3079d1866a7b74405f2da904924777ff20d Mon Sep 17 00:00:00 2001 From: HOS Date: Mon, 12 Dec 2022 21:48:16 +0100 Subject: [PATCH] Constrain array assignments with implicit iterators. Closes #3250 --- chapters/statements.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chapters/statements.tex b/chapters/statements.tex index 7b457173e..ce97744d6 100644 --- a/chapters/statements.tex +++ b/chapters/statements.tex @@ -232,7 +232,8 @@ \subsubsection{Implicit Iteration Ranges}\label{implicit-iteration-ranges} \end{lstlisting} \end{example} -The size of an array -- the iteration range -- is evaluated on entry to the \lstinline!for!-loop and the array size shall not change during the execution of the \lstinline!for!-loop. +There may not be assignment to the entire array inside the loop, but there may be assignment to individual elements or ranges of elements. +The size of an array -- the iteration range -- is evaluated on entry to the \lstinline!for!-loop and the array size will thus not change during the execution of the \lstinline!for!-loop. \subsubsection{Types as Iteration Ranges}\label{types-as-iteration-ranges}