Indicates that the commands following are to be compiled when the expression is TRUE. (#IF is a compiler directive.)
Any of the following comparison operators:
Operator | Description |
---|---|
= | Equal |
!= | Not Equal |
Production Reporting has five compiler directives that allow different pieces of Production Reporting code to be compiled, depending on the existence or value of substitution variables (not program variables, such as, string, numeric, or date).
Substitution variables defined automatically for each -DEBUGxxx letter can also be used with the #IF, #IFDEF, and #IFNDEF directives. They can turn entire sections of an Production Reporting program on or off from the command line, depending on the -DEBUGxxx flag.
You can nest #IF, #IFDEF, or #IFNDEF directives to a maximum of 10 levels.
The #IF, #IFDEF, or #IFNDEF directives cannot be broken across program lines.
Table 42 lists the compiler directives.
Table 42. Production Reporting Compiler Directives
begin-procedure Main #if {type} = 'M' ...code for M here #else #if {type} = 'F' ...code for F here #else #if {type} = 'B' ...code for B here #else show 'M, F or B not selected. Report not created.' stop #endif ! for B #endif ! for F #endif ! for M
#ifndef debugB ! DebugB turned on with -DEBUGB on do test_procedure! Production Reporting command line. #endif
#DEBUG for information on the -DEBUG command-line flag