Linking or inserting new procedures

There are two ways you can insert a procedure into the program flow diagram. Either:

Or:

Either operation leads to the Link edit dialog.

Inserting above the Root

To insert a procedure above the root of the tree, delete the root of the tree, insert the new procedure in its place and then re-insert the old root below the new procedure. Note that if you press <Escape> before re-inserting the root procedure, it may be lost. You can protect yourself against this by pressing the Tie button to tie the original root procedure before you delete it.

Another safe way of inserting above the root is to use the zoom facility:

  1. Select Zoom+ from the menu bar
  2. Delete the root procedure. (You may safely press <Escape> at this point to abandon the changes)
  3. Insert the new procedure as described above.
  4. Press the <↓> key and enter the name of the original root procedure in the Link Edit dialog. The procedure tree will be displayed correctly with the new procedure above and the old procedure tree below (but the change has not yet been made to the real program).
  5. Select Cancel zoom to return to the Program Flow Diagram.
  6. Navigate to the root link and use the Link option to replace the root procedure with the new root procedure.

The new procedure will appear as the root procedure with the original procedure tree below it.

Link edit dialog

If the procedure is beneath a menu type procedure enter the option number. Optionally, enter the option number to be selected when the new procedure ends.

In the name field enter the name of the procedure to be inserted. Press <Ctrl+P> for a menu of existing procedures. For an existing procedure, the subsidiary procedures and their associated procedure bodies will be inserted into your program. Your program will share these components with any other programs that use the same procedure. The concept of sharing components is explained in Sharing Program Components. To create a new procedure enter a name that is not currently used by any procedure. The Program Editor will confirm that the procedure does not exist and will ask you to confirm that you wish to create it.

Create a Condition to Enter if required, and then close the Link Editing Dialog.

Completion of the Link edit dialog takes you to the Procedure Editing menu.