Research V4 development
[unix-history] / man / man3 / switch.3
CommitLineData
4d427a47
KT
1.th SWITCH III 3/15/72
2.sh NAME
3switch \*- switch on value
4.sh SYNOPSIS
5.lp +7 7
6 (switch value in r0)
7.lp +7 7
8.ft B
9 jsr r5,switch; swtab
10.lp +7 7
11.ft R
12 (not-found return)
13.lp +7 7
14.ft B
15 ...
16.lp +7 7
17swtab: val1; lab1;
18.lp +7 7
19 ...
20.lp +7 7
21 valn; labn
22.lp +7 7
23 ..; 0
24.i0
25.dt
26.ft R
27.sh DESCRIPTION
28.it Switch
29compares the value of r0 against each of the val\s8\fI\di\fR\u\s10; if
30a match is found, control is transferred to the corresponding
31lab\s8\fI\di\fR\u\s10 (after popping the stack once).
32If no match has been found by the time a null lab\s8\fI\di\fR\u\s10
33occurs,
34.it switch
35returns.
36.sh BUGS