From Jason Turner

[stmt.switch]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpnw7fwlp7/{from.md → to.md} +18 -5
tmp/tmpnw7fwlp7/{from.md → to.md} RENAMED
@@ -39,11 +39,24 @@ condition, and if there is a `default` label, control passes to the
39
  statement labeled by the default label. If no case matches and if there
40
  is no `default` then none of the statements in the switch is executed.
41
 
42
  `case` and `default` labels in themselves do not alter the flow of
43
  control, which continues unimpeded across such labels. To exit from a
44
- switch, see `break`,  [[stmt.break]]. Usually, the substatement that is
45
- the subject of a switch is compound and `case` and `default` labels
46
- appear on the top-level statements contained within the (compound)
47
- substatement, but this is not required. Declarations can appear in the
48
- substatement of a *switch-statement*.
 
 
 
 
 
 
 
 
 
 
 
 
 
49
 
 
39
  statement labeled by the default label. If no case matches and if there
40
  is no `default` then none of the statements in the switch is executed.
41
 
42
  `case` and `default` labels in themselves do not alter the flow of
43
  control, which continues unimpeded across such labels. To exit from a
44
+ switch, see `break`,  [[stmt.break]].
45
+
46
+ [*Note 1*: Usually, the substatement that is the subject of a switch is
47
+ compound and `case` and `default` labels appear on the top-level
48
+ statements contained within the (compound) substatement, but this is not
49
+ required. Declarations can appear in the substatement of a `switch`
50
+ statement. — *end note*]
51
+
52
+ A `switch` statement of the form
53
+
54
+ ``` bnf
55
+ 'switch (' init-statement condition ')' statement
56
+ ```
57
+
58
+ is equivalent to
59
+
60
+ except that names declared in the *init-statement* are in the same
61
+ declarative region as those declared in the *condition*.
62