Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

Nested DO Loops

  • Last UpdatedFeb 08, 2023
  • 1 minute read

You can nest do-loops one inside the other. The counter for each loop must have a different name.

do !X to 10

 do !Y

 !Z = !X + !Y

 break if (!Y GT 5)

 enddo

enddo

The inner-most loop goes through all the values of !Y before the outer loop moves on to the second value of !X. Note that the break (or skip) command acts just on the loop containing it - in this case the inner-most loop.

Related Links
TitleResults for “How to create a CRG?”Also Available in