HELPLIB.HLB  —  MMS  Description File, Using Conditionals
    The directives .IF, .ELSIF, .ELSE and .ENDIF are used to instruct MMS
    to process selected lines in your description file.

    The .IF directive has the following format:

       .IF boolean-expression
       [description file line] ...
       {.ELSIF boolean-expression}
       [description file line] ...
       [.ELSE]
       [description file line] ...
       .ENDIF

    In  this  syntax,  the  "description  file  line"  is  zero  or  more
    description file lines that may include further  .IF directives.  The
    .IF  directive  may be  followed  by  zero  or  any number of  .ELSIF
    directives,  and zero or one .ELSE directive.  The .IF directive must
    always be accompanied  by a  matching .ENDIF directive.

    MMS  evaluates  the   'boolean-expression'  specified  with  the  .IF
    directive. If true, the lines of the description file between the .IF
    directive and a corresponding .ELSIF, .ELSE  or .ENDIF are processed;
    then, if either .ELSIF or .ELSE  were detected,  all description file
    lines  from  this  line  to the  corresponding  .ENDIF  directive are
    ignored. When the boolean-expression specified with the .IF directive
    is  false,   all   description  file  lines  from  this  point  to  a
    corresponding    .ELSE,    .ENDIF   or    .ELSIF   whose   associated
    'boolean-expression' is true, are ignored.

    The 'boolean-expression' specified in  .IF and .ELSIF  directives  is
    defined as follows:

    boolean-expression
       :== [ .NOT ] boolean-operation |
           [ .NOT ] boolean-operation boolean-operator boolean-expression

    boolean-operation :== ( boolean-expression ) |
                          word |
                          word comparison-operator word

    word :== null |
             any sequence of characters, terminated by space, and not
             starting with '.', '(' or ')'.

    boolean-operator :== .AND | .OR

    comparison-operator :== .EQ | .NE | .GE | .LE | .GT | .LT

    The operands in the 'boolean-expression' take one of two forms:

    .IF word

    or,

    .IF word1 .EQ word2

    In the first case,  MMS checks to see if  'word' is a  macro that has
    been defined to a  non-null value;  the expression  is true if it is,
    false otherwise. (NOTE: this is  precisely the same  functionality as
    that of the obsolete .IFDEF directive).  For example,  to check  that
    the macro FRUIT is defined, write:

    .IF FRUIT

    In the second case,  MMS  performs the requested  comparison  between
    'word1' and 'word2' to determine the expression value; the comparison
    operation  is  case-sensitive.  Note  that,  when  using  macros  and
    functions in expressions of this form,  you must reference the  macro
    or function in the standard way, in $().  For example,  to check that
    the macro FRUIT is defined to be BANANAS, write:

    .IF $(FRUIT) .EQ BANANAS

    If you need to compare words that start with the  characters '.', '('
    or  ')'  or  text  containing  layout  characters  then,  enclose the
    words or text   (on  both  sides  of  the  comparison  operator)   in
    quotation-marks.  For example,  to check that the macro  FILETYPE  is
    defined  as  .MMS,  and  that  the  macro  VERSION  is not defined as
    'Version 3.2', you must write:

    .IF "$(FILETYPE)" .EQ ".MMS" .AND "$(VERSION)" .NE "Version 3.2"
Close Help