Go to the first, previous, next, last section, table of contents.


Flow Control

The following two keywords may occasionlly be needed. The break keyword can normally be simulated in other ways but is useful in record loops. Its function is to break one level back. Normally it is used within the body of a loop to break out of the loop on certain conditions (as an addition to the standard loop condition in while ... do ... wend loops). The exit keyword exits the entire equate expression all the way back to where it was initially called from within a text body or in a filter condition. The example below searches all the records in the names database for a matching value and returns the record number of the first record the field matched.

%%EQUATE FIND
  1 >> n
  roll
    if %NAME = "Smith" then break
    else ++n >> n
    endif
  through:names
  outputs(n)


Go to the first, previous, next, last section, table of contents.