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]].
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
substatement
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
|