SPeCS Packages Documentation
    Preparing search index...
    • Splits a do-loop with multiple body statements into one loop per statement.

      If the loop has a single body statement or is not a range loop, it is returned unchanged.

      Parameters

      Returns DoStatement[]

      The replacement loops inserted into the AST, in source order.

      // Before:
      // do i = 1, n
      // a(i) = b(i)
      // c(i) = d(i)
      // end do

      // After:
      // do i = 1, n
      // a(i) = b(i)
      // end do
      // do i = 1, n
      // c(i) = d(i)
      // end do