6. Embedded QUEL for BASIC : BASIC Variables and Data Types : Variable and Type Declarations : Assembling and Declaring External Compiled Forms
 
Share this page                  
Assembling and Declaring External Compiled Forms
You can pre-compile your forms in the Visual Forms Editor (VIFRED). This saves time that would otherwise be 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. After the file is created, you can use the following VMS command to assemble it into a linkable object module:
macro filename
This command produces an object file containing a global symbol with the same name as your form. Before the Embedded SQL/FORMS statement addform can refer to this global object, you must declare it in an Embedded SQL declaration section, using the following syntax:
external integer formname
Syntax Notes:
1. The formname is the actual name of the form. VIFRED gives this name to 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 # sign.
2. The external statement 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.
##   external integer empform
##   addform empform          ! The global object
##   display #empform         ! The name of the form