\noqualifier
\se
SECTION./
\es\co
IF							27-JUN-2005  KB
\oc\su
IF par1 op par2 command_string
	execute conditional statement
\us\pu
Purpose:
          Execute conditional statement.
\up\sy
Syntax: 
          IF par1 op par2 command_string  (a)

          IF par1 op par2 THEN  (b)
             command_string
          ELSEIF par1 op par2 THEN
             command_string
             ...
          ELSE
                command_string
          ENDIF 

\ys\pa
          par1,par2 = name of a keyword (with parentheses) or a constant;
               numerical constants begin with a digit;
               character constants are enclosed in quotation marks (").
               All character strings not enclosed in quotation marks are
               interpreted as keyword names !!!
\ap\pa
          op = logical operation, may be .EQ. or .NE. or .GE. or .GT. or .LE.
               or .LT. with the usual meaning (cf. FORTRAN)
\ap\pa
          command_string = a valid MIDAS command line;
               but remember that the total no. of `tokens' per line is 10,
               therefore only "short" commands can be used for option (a)
\ap\no
Note: 
          Please, note that contrary to FORTRAN the ELSEIF and ENDIF must(!)
          be written as one word, i.e. ELSE IF results in an error ...
          Logical operations can be combined with an .AND. or .OR.
          (but only a single .AND. or .OR. because we only have max. 10 tokens
          per command line), see the examples.
  
	  If par1 and par2 are char.strings, they are compared as uppercase
	  strings, so also "ABCD" and "abcd" are considered equal!
	  If you need exact comparison use the function M$STRCMP().
\on\see
See also:
          Chapter 3 of the MIDAS Users Guide, Volume A
	  COMPUTE/KEYWORD
\ees\exs
Examples:
\ex
          IF INPUTR(6) .GT. 22.1 GOTO END
            will result in a branch to the command following the label END:
            if the element (6) of keyword INPUTR is greater than 22.1
 
\xe\ex
          IF INPUTR(6) .GT. 22.1 THEN
             WRITE/KEY IN_B {INPUTR(6)}
             WRITE/OUT {IN_B}
          ELSEIF IN_A(3:4) .EQ. "AB" THEN
             WRITE/OUT "here we are..."
          ENDIF
 
\xe\ex
          IF INPUTC(1:3) .EQ. "XXX" .OR. INPUTD(1) .LT. 0.0 RETURN
            we return from this procedure if either condition is true
 
\xe\ex 
          IF INPUTI(10) .EQ. 10 .AND. INPUTI(11) .NE. 11 THEN
             @@ proca 
          ELSE
             @@ procb 
          ENDIF
\xe\sxe




