HomeStartingEnvironmentDBMSVisualPQLProceduresSQLFormsHost/APIIndex
Forms homecontents start chapter top of pagebottom of pagenext page index Compiler Directives

Compiler Directives

There are a number of commands which deal with input such as putting comments in the input text, including text from another file, creating synonyms for any text string and controlling the way the output from the compiler is listed. The compiler directive commands can be used at any point in the input file.

Comments

Comments are indicated by an asterisk (*) as the first non-blank character on a line. For example:

* This is a Comment Line

INCLUDE

INCLUDE 'file_name'
Includes a file of commands at that point in a Form Definition. The Included file can contain any valid set of commands. INCLUDE is useful when developing screens separately or when a set of commands is common to several Form Definition Files.

INCLUDE 'SYNONYM.cmp'

SYNONYM

SYNONYM name text

Defines a name that is replaced during compilation with the text. The SYNONYM command creates a short mnemonic name for a long, complex expression. The synonym definition must occur before it is referenced in another command. Once a synonym has been defined, it can be used anywhere in the form definition.

For example: suppose the CALL for a number of screens is to have the following clauses:

CALL screen AUTO CALL RETURN WRITE NOPROMPT NODATA
A synonym called AUTOSCREEN could be created and used as follows:

SYNONYM AUTOSCREEN -
  AUTO CALL RETURN WRITE NOPROMPT NODATA
...
CALL screen AUTOSCREEN

Listing Commands

These commands control the titles and paging of a listing of the compilation. In order to get a listing of the compilation, use the LISTING = filename parameter on the execution statement. These commands do not affect anything other than the listing.

When compiling large forms, you are advised to send the output to a listing file, and review this for syntax or compilation errors.

EJECT

Causes a page eject to occur at this point.

FOOTING

FOOTING 'footing_string'
Causes a text string to be printed at the bottom of every output listing page. FOOTING can be respecified as many times as necessary.

MAINTITLE

MAINTITLE 'main_title_string'
Causes a text string to be printed as the first line of each output page.

SPACE

SPACE [n][,m]
Prints n blank lines. If fewer than n lines remain on the page, a page eject is performed. If m is specified, and at least n+m lines remain on the page, n lines are skipped and printing continues. A page eject is performed if fewer than n+m lines remain. This allows a group of commands to be printed together.

SPACE 1,10

SUBTITLE

SUBTITLE 'subtitle_string'

Causes a string of text to be printed as the second line of each output page. The SUBTITLE command can appear as many times as necessary.

homecontents start chapter top of pagebottom of pagenext page index