|        | |||||
|  | |||||
| Initialization and termination rules: universal | |||||
| Prerequisite Concepts | Related Syntax | ||||
Initialization and termination rules that can be used in any kind of OmniMark program are needed to allow programs to provide generic services that can be applied to any type of program. The process-start and process-end rules fulfill this need. These rules allow initiation and termination processing to be placed adjacent to the global declarations, function definitions, and processing rules with which they are associated. This promotes a declarative style of programming.
Because they are independent of the program type, process-start and process-end rules can be used in both process and translation programs. This makes them suitable for use in include files that, for example, contain:
global shelf declarations
process-start rules to initialize those shelves
process-end rules to perform final processing on those shelves
Such an include file can be used in:
find-start, find-end, document-start, or document-end rules
down-translate programs, which don't allow find-start and find-end rules
cross-translate programs, which don't allow document-start and document-end rules
| Prerequisite Concepts Initialization and termination rules | Related Syntax process-end process-start | 
| ---- |