#

# LogiView

## Control Structures within Procedures

| While decision tables allow the use of rules (with conditions and actions) and structuring, procedures are used to model control structures that you may know from one of the standard programming languages. Basic, Fortran, Pascal or C all have similar mechanisms. ### Conditions One or more alternative conditions can be represented with an 'if/endif' control structures that may - if applicable - be extended using 'elseif' or 'else' commands:
    if ( Condition 1 )
         Action 1
    elseif ( Condition 2 )
         Action 2
    else
         Action 3
    endif
If the first condition is met, the first action is performed. If the second condition is met, the second action is performed. If none of the conditions are met, action 3 is executed. ###
| Linking Conditions
| Combining Conditions
| ### Loops Loops are easily realized using a 'WHILE' ... 'DONE' control structure:
    while ( Condition )
         Action
    done
The loop is repeated until the the exit condition is met.
| Be careful with endless loops. They may occur if the exit criteria cannot be met.