diff --git a/test/release/examples/primers/arrays.chpl b/test/release/examples/primers/arrays.chpl index 7bc449a7d8d6..1ec544c7d732 100644 --- a/test/release/examples/primers/arrays.chpl +++ b/test/release/examples/primers/arrays.chpl @@ -129,9 +129,9 @@ writeln("After incrementing B's elements, B is:\n", B, "\n"); // Array ``A2`` above will have the implicit domain ``{0..4}`` to // represent the five values in its initializing expression. // -// When an array is modified without being specified in the iterand inside -// of a parallel construct (like ``forall`` in the example below), it needs -// an explicit ``ref`` intent. +// The explicit ``ref`` intent is required for ``B`` in the example below +// because ``B`` is not modifed directly through the loop's index variable (in +// this case ``i`` and ``j``). // // An array's domain can be queried using the ``.domain`` method, // which returns a ``const ref`` to the domain in question. For diff --git a/test/release/examples/primers/forallLoops.chpl b/test/release/examples/primers/forallLoops.chpl index 5762c190965a..dc1945097e27 100644 --- a/test/release/examples/primers/forallLoops.chpl +++ b/test/release/examples/primers/forallLoops.chpl @@ -32,8 +32,9 @@ an expression. Both kinds are shown in the following sections. "Must-parallel" forall statement -------------------------------- -In the following example, the forall loop iterates over the array indices -in parallel. Since the loop indirectly loops over ``A`` and the body modifies it, an explicit ``ref`` intent must be used. +In the following example, the forall loop iterates over the array indices in +parallel. Since the loop iterates over ``1..n`` and not ``A``, an explicit +``ref`` intent must be used to allow modification of ``A``. */ config const n = 5; @@ -81,8 +82,8 @@ provide a "leader" iterator and all iterables provide "follower" iterators. These are described in the :ref:`parallel iterators primer `. -Here we illustrate zippering arrays and domains. Since ``C`` is not directly -iterated over, we must explicitly mark it as modified with a ``ref`` intent. +Here we illustrate zippering arrays and domains. In this example, we must +explicitly mark ``C`` as modified with a ``ref`` intent. */ var C: [1..n] real;