~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to prim/help/branch.mlq

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
% @(#)branch.mlq        19.1 (ESO-IPG) 02/25/03 14:02:59
 
2
\rightpage
 
3
\noqualifier
 
4
\se
 
5
SECTION./
 
6
\es\co
 
7
BRANCH                                                  15-JAN-1987  KB
 
8
\oc\su
 
9
BRANCH var comparisons labels
 
10
        multi-way branching
 
11
\us\pu
 
12
Purpose:
 
13
          Do multi-way branching.
 
14
\up\sy
 
15
Syntax: 
 
16
          BRANCH var comparisons labels
 
17
\ys\pa
 
18
          var = name or contents of key (type integer or character)
 
19
\ap\pa
 
20
          comparisons = string of integer or character comparison-values
 
21
              separated by commas
 
22
\ap\pa
 
23
          labels = string of labels (without colon (:) in the end), separated
 
24
              by commas
 
25
\ap\sa
 
26
See also:
 
27
          GOTO
 
28
\\
 
29
          Chapter 3 of MIDAS Users Guide, volume A
 
30
\as\no
 
31
Note:  
 
32
          If var is equal to any of the comparison-values, flow-of-control is
 
33
          transferred to the corresponding label as given in the parameter
 
34
          'labels'.
 
35
\\
 
36
          If no match is found, the statement following the BRANCH command will
 
37
          be executed.
 
38
\on\exs
 
39
Examples:
 
40
\ex
 
41
          BRANCH P1(4:4) A,B,C,D,X LAB_A,LAB_B,LAB_C,LAB_D,LAB_X
 
42
          if P1(4:4) is the character C, a jump to the line with the label
 
43
          LAB_C: will be done
 
44
\xe\ex
 
45
          BRANCH inputi(11) 2,04,6,8 L1,L2,L3,L4
 
46
          if INPUTI(11) is 4 a jump to the line with label L2: is done
 
47
\xe \sxe