Skip to main content

NOTICE: Due to a lapse in annual appropriations, most of this website is not being updated. Learn more.

Form submissions will still be accepted but will not receive responses at this time. Sections of this site for programs using non-appropriated funds (such as NVLAP) or those that are excepted from the shutdown (such as CHIPS and NVD) will continue to be updated.

U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Nested Loops

Loops can be nested to define more complex measurements.  Nesting is accomplished by placing one loop inside another and iterating through that one loop completely for every iteration in the other loop.

Nested Loops Reference Example 1

When nesting, only the innermost (leaf) loop contains points, while the outer loop(s) just move through measurement states without counting.

Nested Loops Reference Example 2

Note: Unlike with sub-loops, nested loops require that you open a loop block that is a level of indentation deeper than the preceding loop. Every time you wish to embed another loop inside a given loop, you must indent another level.

Created December 10, 2018
Was this page helpful?