% @(#)branch.mlq	19.1 (ESO-IPG) 02/25/03 14:02:59
\rightpage
\noqualifier
\se
SECTION./
\es\co
BRANCH							15-JAN-1987  KB
\oc\su
BRANCH var comparisons labels
	multi-way branching
\us\pu
Purpose:
          Do multi-way branching.
\up\sy
Syntax: 
          BRANCH var comparisons labels
\ys\pa
          var = name or contents of key (type integer or character)
\ap\pa
          comparisons = string of integer or character comparison-values
              separated by commas
\ap\pa
          labels = string of labels (without colon (:) in the end), separated
              by commas
\ap\sa
See also:
          GOTO
\\
          Chapter 3 of MIDAS Users Guide, volume A
\as\no
Note:  
          If var is equal to any of the comparison-values, flow-of-control is
          transferred to the corresponding label as given in the parameter
          'labels'.
\\
          If no match is found, the statement following the BRANCH command will
          be executed.
\on\exs
Examples:
\ex
          BRANCH P1(4:4) A,B,C,D,X LAB_A,LAB_B,LAB_C,LAB_D,LAB_X
          if P1(4:4) is the character C, a jump to the line with the label
          LAB_C: will be done
\xe\ex
          BRANCH inputi(11) 2,04,6,8 L1,L2,L3,L4
          if INPUTI(11) is 4 a jump to the line with label L2: is done
\xe \sxe
