Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
IF Block Syntax
 Example                                   Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Syntax:   IFcond expression
              ifstatements
            [ELSEIFcond expression
              elseifstatements]
              ∙
              ∙
              ∙
            [ELSE
              elsestatements]
            ENDIF
 
  See also: Conditional Assembly Directives, IF, .IF, .ELSE, .ENDIF,
            Control-Flow Directives
 
  Description:
 
     The IF block format can be used to create a source file that will
     generate a variety of programs, depending on constants or
     environment variables. For example, you can create a single source
     file that generates code for different memory models and operating
     environments. IF blocks can be nested up to 20 levels but cannot
     span include files or structure, union, or macro definitions.
 
     The statements following the ELSE directive are assembled only if
     the preceding IF directive was found to be false (zero). Only one
     ELSE statement is allowed in each IF block, although there can be
     several ELSEIF statements.
 
     IFcond is one of the conditional assembly directives beginning
     with "IF" (such as IF, IFE, and IFB). There is an optional
     ELSEIFcond corresponding to each IFcond.
 
     The <ifstatements>, <elseifstatements>, and <elsestatements> are
     each a series of one or more assembly-code statements. The
     respective conditions determine which block is assembled, if any.
     The ELSE and ELSEIF blocks are optional.
                                    -♦-