Using Looping and Conditionals
Until you become familiar with the syntax and power of logical expressions and variables, you may find it difficult to write if/else, while, and for commands.
The Looping and Conditionals help book contains examples of if/else, while, and for commands. By examining these examples, you will get a sense of how expressions and variables are used to build these commands.
Start by looking over the syntax statements for the if/else, while, and for commands. Then view the online help for variables and expressions . Finally, work through the examples in the Looping and Conditionals help.