2. Embedded QUEL for C : C Variables and Data Types : Variable and Type Declarations : Assembling and Declaring External Compiled Forms - VMS only
 
Share this page                  
Assembling and Declaring External Compiled Forms - VMS only
You can pre-compile your forms in the Visual Forms Editor (VIFRED). By doing so, you save 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 on which to write the MACRO description. After the file is created, you can assemble it into a linkable object module with the VMS command:
macro filename
The result of this command is an object file containing a global symbol with the same name as your form.
Before the EQUEL/FORMS addform statement can refer to this global object, you must declare it to EQUEL with the following syntax:
globalref int *formname;
Syntax Notes:
The formname is the actual name of the form. VIFRED gives this name to the variable holding the address of the global object. The formname is also used as the title of the form in other EQUEL/FORMS statements. In all statements that use the formname as an argument, except for addform, you must dereference the name with #.
The globalref storage class associates the object with the external form definition.
Although you declare formname as a pointer, you should not precede it with an asterisk when using it in the addform statement. The following example shows a typical form declaration and illustrates the difference between using the form's object definition and the form's name. For example:
## globalref     int *empform;
## addform empform;       /* The global object */ 
## display #empform;
    /* The name of the form must be dereferenced 
    ** because it is also the name of a variable */