Library /sys$common/syshlp/helplib.hlb  —  MACRO  /ALPHA  Directives  .IF x, Examples
      Example 1
      Assume that symbol SYM is defined:

           .IF DEFINED   SYM     ; Tests TRUE since SYM is defined.
             .                   ;   Assembles the following code.
             .
             .
           .IF_FALSE             ; Tests FALSE since previous
             .                   ;   .IF was TRUE.  Does not
             .                   ;   assemble the following code.
             .
           .IF_TRUE              ; Tests TRUE since SYM is defined.
             .                   ;   Assembles the following code.
             .
             .
           .IF_TRUE_FALSE        ; Assembles following code
             .                   ;   unconditionally.
             .
             .
           .IF_TRUE              ; Tests TRUE since SYM is defined.
             .                   ;   Assembles remainder of
             .                   ;   conditional assembly block.
             .
           .ENDC
      Example 2
      Assume that symbol X is defined and that symbol Y is not
      defined:

           .IF DEFINED  X        ; Tests TRUE since X is defined.
           .IF DEFINED  Y        ; Tests FALSE since Y is not defined.
           .IF_FALSE             ; Tests TRUE since Y is not defined.
             .                   ;   Assembles the following code.
             .
             .
           .IF_TRUE              ; Tests FALSE since Y is not defined.
             .                   ;   Does not assemble the following
             .                   ;   code.
             .
           .ENDC
           .ENDC
      Example 3
      Assume that symbol A is defined and that symbol B is not
      defined:

           .IF DEFINED  A       ; Tests TRUE since A is defined.
             .                  ;   Assembles the following code.
             .
             .
           .IF_FALSE            ; Tests FALSE since A is defined.
             .                  ;   Does not assemble the following
             .                  ;   code.
             .
           .IF NOT_DEFINED B    ; Nested conditional directive
             .                  ;   is not evaluated.
             .
             .
           .ENDC
           .ENDC
      Example 4
      Assume that symbol X is not defined but symbol Y is defined:

           .IF DEFINED  X       ; Tests FALSE since X is not defined.
             .                  ;   Does not assemble the following
             .                  ;   code.
             .
           .IF DEFINED  Y       ; Nested conditional directive
             .                  ;   is not evaluated.
             .
             .
           .IF_FALSE            ; Nested subconditional
             .                  ;   directive is not evaluated.
             .
             .
           .IF_TRUE             ; Nested subconditional
             .                  ;   directive is not evaluated.
             .
             .
           .ENDC
           .ENDC
Close Help