$CATALOGUE compiler directive

$CATALOGUE Compiler Directive

Top  Previous  Next

 

The $CATALOGUE directive (or the American spelling $CATALOG) causes automatic cataloguing of a program after successful compilation.

 

 

Format

 

$CATALOGUE name  {GLOBAL | PRIVATE | LOCAL} {NO.QUERY}

 

where

 

nameis the name to be used when the program is added to the catalogue.

 

 

The $CATALOGUE directive causes the compiler to add the program to the system catalogue with the given call name if the compilation is successful. If name is omitted, the source record name is used. When using this default name, an error will be reported if the name is not the same as the name specified in the PROGRAM, SUBROUTINE, FUNCTION or CLASS statement.

 

If the name does not follow the normal QMBasic name construction rules (e.g. a Pick user exit such as 50BB) it should be enclosed in quotes. The rules for catalogue name format are described with the CATALOGUE command.

 

The GLOBAL, PRIVATE and LOCAL qualifiers set the cataloguing mode. If none of these is present, the system's default mode is used.

 

The NO.QUERY keyword suppresses the prompt that normally appears if the program is already catalogued in a different mode.

 

Automatic cataloguing can also be performed using the CATALOGUE entry in the $BASIC.OPTIONS record as described under the BASIC command. Use of the $CATALOGUE compiler directive will override any alternative settings specified in the $BASIC.OPTIONS record.

 

 

Examples

 

$CATALOGUE

This directive causes the compiler to copy the program to the private catalogue using its default name.

 

$CATALOGUE PRINT.INVOICE

This directive causes the compiler to copy the program to the private catalogue as PRINT.INVOICE.

 

$CATALOGUE PRINT.INVOICE LOCAL

This directive causes the compiler to copy the program to the local catalogue as PRINT.INVOICE.

 

$CATALOGUE "50BB" GLOBAL

This directive causes the compiler to copy the program to the global catalogue as 50BB. Note the need for quotes as the name does not comply with QMBasic name construction rules which require the first character to be a letter.

 

 

See also:

$NO.CATALOGUE, $BASIC.OPTIONS