A QA Build program consists of a program header and a procedure tree:
The program header defines the type of access to the database, and the initial output destination of your program
The procedure tree defines the sequence in which tasks are executed in the program, and is defined recursievly using one or more procedures.
A procedure tree is represented in the QA Build system by a program flow diagram, a (rather old) example of which is shown below.
The order of execution is top to bottom, left to right. The MAIN_MENU procedure marked with an M offers the user a number of options. The options are shown as subsidiary procedures. Conditional procedures, such as RETURN_TO_DOS are shown with question marks (?). Repeated procedures, such as ORDER_ENTRY are shown with an asterisk (*). Further options to the right are indicated by the >> symbol.
The procedures in the example program flow diagram above are executed in this sequence (the | symbol is used to separate menu options):
HEADING, MAIN_MENU,[RETURN_TO_DOS | ORDER_ENTRY, ORDER_LINES | STOCK_REVIEW ..]
Each procedure has a corresponding procedure body.
Each procedure body performs one logical task, such as updating a specific table on a database, or prompting the user for input. The distinction between a procedure and a procedure body is that a procedure defines the structure of your program, and a procedure body defines the task to be performed.