Syntax
ANNOUNCE idModuleArguments
idModule
is the name of the module.
Description
ANNOUNCE gives a name to a source file (.prg). Another file can then link the whole module into the program with REQUEST idModule, even when no function of the module is called. This is useful for a module that only has an INIT PROCEDURE or EXIT PROCEDURE.
Write ANNOUNCE at module level, outside any function. A source file has only one module name.
Notes
The module name becomes an empty procedure, so it must not duplicate the name of a function or procedure in the program. A second ANNOUNCE in the same file, or ANNOUNCE inside a function, is a compile error.
Example
// Companion library module for REQUEST.prg.
ANNOUNCE InvoiceAudit
INIT PROCEDURE OpenAudit()
QOut( "Invoice audit started" )
RETURN
EXIT PROCEDURE CloseAudit()
QOut( "Invoice audit finished" )
RETURNOutput