
154 Introduction to Concurrency in Programming Languages
for i=1 to n
C(i) = A(i) + B(i)
end
If the arrays didn’t all have the same shape, the common loop bounds
assumed by the limits of the loop iterate i couldn’t be applied to all of the
arrays. Applying this loop to arrays with incompatible shapes would likely
result in an out-of-bounds error.
It is important to note that there is no implied order to the evaluation
of the operations on array elements with array notation. Thus there are no
loop iteration dependencies and the equivalent implementation using explicit
loops, shown above, could just as well have run backwards; the results would
be the same. ...