Rexx Programming/How to Rexx/control structure
Control structures (also known as control constructs) are constructs used within a program to control the flow of a program based on given conditions. Control structure typically uses conditional branching instructions or loop control statements. Code within control structures is typically arranged into blocks in a similar fashion to control structures written in C.
The following example shows a conditional code being used as a conditional branch:
if guess = 6 then
say "Wow! That was a lucky guess."
The following example shows a block of code being used in a loop:
do l = 1 to 10