Go to the previous, next section.

Structured and Unstructured Control Flow

The FOR function will create a structured for loop. By default the step is set to 1 and the test is set to "<=". These fields can be specified by using different prototypes of FOR. The functions IF, WHILE, DO and RETURN can be used to create structured control flow while GOTO will help generate unstructured control flow.

    block & FOR(block &index, 
                block &lb, 
                block &ub, 
                block &body)
    block & FOR(block &index, 
                block &lb, 
                binary_op test, 
                block &ub, 
                block &body)
    block & FOR(block &index, 
                block &lb, 
                block &ub, 
                block &step, 
                block &body)
    block & FOR(block &index, 
                block &lb, 
                binary_op test, 
                block &ub, 
                block &step, 
                block &body)





    block & IF(block &cond, 
               block &then_part)
    block & IF(block &cond, 
               block &then_part, 
               block &else_part)

    block & WHILE(block &cond, 
                  block &body)
    block & DO(block &cond,
               block &body)
    block & RETURN();
    block & RETURN(block &val)

    block & GOTO(block &label)
    block & procedure(block &, block &, block &)

Go to the previous, next section.