core

## Branching by Using Flow Control: Introduction

Suppose you have a part with many features, but you just want to measure a few features over and over to get a comprehensive statistical set of data for those features. Suppose you want to jump to a particular part in your measurement routine dependent on a response from the user. You can accomplish tasks such as these, and many others, by using flow control commands. By setting up conditions for certain commands, you can control the flow of your measurement routine.

This chapter provides you with the information you need to accomplish such tasks. It explains the syntax for conditional statements, loops, and subroutines. It also provides many code samples.

The main topics covered in this chapter include the following:

- Using Control Pairs

- Using Generic Loops

- Using Labels

- Branching on an Error

- Branching with Subroutines

- Ending a Measurement Routine