Call a Procedure (Extended) code template

Top  Previous  Next

 

This code template is similar to the actions available in the Menu Editor , and adds extended features through the following template prompts:

 

Action

Choose Call a Procedure or Run a Program from the drop list provided.

 

The remaining prompts are similar to those found in the Menu Editor for each menu item’s actions, and are shown below:

Procedure Definition Prompts

 

Procedure Name

From the Procedure Name drop down list, choose an existing procedure name, or type a new procedure name. A new procedure appears as a "ToDo" item in your Application Tree.

Initiate a Thread

Optionally check the Initiate a Thread box. If the procedure initiates a thread, specify the Thread Stack size. Clarion uses the START function to initiate a new execution thread. You can optionally specify Parameters, Requested File Action, or both.

Thread Stack

Accept the default value in the Thread Stack spin box unless you have extraordinary program requirements. To change the value, type in a new value or click on the spin box arrows.

 

 

Parameters

In the Parameters field, optionally type a list of variables or data structures passed to the procedure. Press the "E" button to call the Expression Editor. This dialog is used to help you construct syntactically correct expressions to use in the Parameters prompt.

Return Thread Variable

If the thread procedure called is prototyped to return a value, press the ellipsis button here to select a variable to receive the returned value.

 

 

Requested File Action

From the drop down list, optionally select None, Insert, Change, Delete, or Select. The default selection is None. The Global Request variable gets the selected value. The called procedure can then check the value of the Global Request variable and perform the requested file action.

Return Value Variable

If the procedure called is prototyped to return a value, press the ellipsis button here to select a variable to receive the returned value.

 

Optionally check the Reference Assign check box if the variable defined is a reference variable.

 

Program Definition Prompts

 

Program Name

Type the program name. The program name must be in your path or current folder, else enter the full path and executable program. Quotes are added to your entry so you don't need to enter any.

Parameters

Optionally type a list of values that are passed to the program. Press the "E" button to call the Expression Editor. This dialog is used to help you construct syntactically correct expressions to use in the Parameters prompt.