Types of procedures

Three types of procedures are available:

 

1.Global procedure: can be used in all project the events and processes of the project (declared in a set of procedures).

2.Local procedure in a Window, Page or Mobile Window: can be used in all the events and processes that depend on the object in which this procedure was declared.

3.Internal procedure in a process or event: can only be used in the process or event where it was declared.

 

Creating and calling a procedure

Global procedure

To create a global procedure, you must:

1.Create (if necessary) a set of procedures (via the "Project explorer" pane, "Procedures" folder). Give a name to the set of procedures.

2.Create a global procedure in the set of procedures (via the "Project explorer" pane, "Procedures, Set name" folder). Give a name to the procedure.

3.Type the code of global procedure. The procedure code has the following format:

 

PROCEDURE <Name of global procedure>()

 

Local procedure

To create a local procedure, you must:

1.Select the element associated with the procedure (window, page, etc.).

2.Create a local procedure (via the "Project explorer" pane, expand the element name, "Local procedures" folder).

3.Give a name to the procedure.

4.Type the code of local procedure. The procedure code has the following format:

PROCEDURE <Name of local procedure>()

Internal procedure

To create an internal procedure, type the following code in the required process:

INTERNAL PROCEDURE <Procedure name>()

<Code of internal procedure>

END