Assembling and Declaring External Compiled Forms
You can pre-compile your forms in the Visual Forms Editor (VIFRED). This saves the time otherwise required at runtime to extract the form's definition from the database forms catalogs. When you compile a form in VIFRED, VIFRED creates a file in your directory describing the form in the VAX-11 MACRO language. VIFRED prompts you for the name of the file with the MACRO description. After the file is created, use the following command to assemble it into a linkable object module with the VMS command:
macro filename
This command produces an object file containing a global symbol with the same name as your form. Before the EQUEL/FORMS statement addform can refer to this global object, it must be declared in an EQUEL declaration section. The Pascal compiler requires that this be an external declaration. The syntax for a compiled form declaration is:
## var
## formname: [external] Integer;
Syntax Notes:
1. The formname is the actual name of the form. VIFRED gives this name to the address of the external object. The formname is also used as the title of the form in other EQUEL/FORMS statements. In all statements other than addform that use formname as an argument you must differentiate the name with a # sign.
2. The external attribute associates the object with the external form definition.
The example below shows a typical form declaration and illustrates the difference between using the form's object definition and the form's name.
## var
## empform: [external] Integer;
...
## addform empform {the global object}
## display #empform {the name of the form}
...