Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Unified Diff: docs/language/dartLangSpec.tex

Issue 1189523004: Fix a typo in the specification of switch cases. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: docs/language/dartLangSpec.tex
diff --git a/docs/language/dartLangSpec.tex b/docs/language/dartLangSpec.tex
index 6627971b77eeca7801e79285ec41fc721d645c7e..0a19073d13c5c0dcf0a26eca9685baaf9daaa946 100644
--- a/docs/language/dartLangSpec.tex
+++ b/docs/language/dartLangSpec.tex
@@ -5741,7 +5741,7 @@ The {\em switch statement} supports dispatching control among a large number of
{\bf switchCase:}
- label* (\CASE{} expression `{\escapegrammar :}') statements
+ label* \CASE{} expression `{\escapegrammar :}' statements
.
{\bf defaultCase:}
@@ -5753,21 +5753,21 @@ The {\em switch statement} supports dispatching control among a large number of
Given a switch statement of the form
\begin{dartCode}
-\SWITCH{} ($e$) \{
- \CASE{} $label_{11} \ldots label_{1j_1}$ $e_1: s_1$
- $\ldots$
- \CASE{} $label_{n1} \ldots label_{nj_n}$ $e_n: s_n$
- \DEFAULT{}: $s_{n+1}$
+\SWITCH{} ($e$) \{
+ $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
+ $\ldots$
+ $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
+ $label_{(n+1)1} \ldots label_{(n+1)j_{n+1}}$ \DEFAULT{}: $s_{n+1}$
\}
\end{dartCode}
or the form
\begin{dartCode}
-\SWITCH{} ($e$) \{
- \CASE{} $label_{11} \ldots label_{1j_1}$ $e_1: s_1$
- $\ldots$
- \CASE{} $label_{n1} \ldots label_{nj_n}$ $e_n: s_n$
+\SWITCH{} ($e$) \{
+ $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
+ $\ldots$
+ $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
\}
\end{dartCode}
@@ -5797,21 +5797,21 @@ The \SWITCH{} statement should only be used in very limited situations (e.g., i
Execution of a switch statement of the form
\begin{dartCode}
-\SWITCH{} ($e$) \{
- \CASE{} $label_{11} \ldots label_{1j_1}$ $e_1: s_1$
- $\ldots$
- \CASE{} $label_{n1} \ldots label_{nj_n}$ $e_n: s_n$
- \DEFAULT{}: $s_{n+1}$
+\SWITCH{} ($e$) \{
+ $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
+ $\ldots$
+ $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
+ $label_{(n+1)1} \ldots label_{(n+1)j_{n+1}}$ \DEFAULT{}: $s_{n+1}$
\}
\end{dartCode}
or the form
\begin{dartCode}
-\SWITCH{} ($e$) \{
- \CASE{} $label_{11} \ldots label_{1j_1}$ $e_1: s_1$
- $\ldots$
- \CASE{} $label_{n1} \ldots label_{nj_n}$ $e_n: s_n$
+\SWITCH{} ($e$) \{
+ $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
+ $\ldots$
+ $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
\}
\end{dartCode}
@@ -5832,11 +5832,11 @@ A case clause introduces a new scope, nested in the lexically surrounding scope.
Execution of a \CASE{} clause \CASE{} $e_{k}: s_{k}$ of a switch statement
\begin{dartCode}
-\SWITCH{} ($e$) \{
- \CASE{} $label_{11} \ldots label_{1j_1}$ $e_1: s_1$
- $\ldots$
- \CASE{} $label_{n1} \ldots label_{nj_n}$ $e_n: s_n$
- \DEFAULT{}: $s_{n+1}$
+\SWITCH{} ($e$) \{
+ $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
+ $\ldots$
+ $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
+ $label_{(n+1)1} \ldots label_{(n+1)j_{n+1}}$ \DEFAULT{}: $s_{n+1}$
\}
\end{dartCode}
@@ -5852,10 +5852,10 @@ If execution reaches the point after $s_h$ then a runtime error occurs, unless
Execution of a \CASE{} clause \CASE{} $e_{k}: s_{k}$ of a switch statement
\begin{dartCode}
-\SWITCH{} ($e$) \{
- \CASE{} $label_{11} \ldots label_{1j_1}$ $e_1: s_1$
- $\ldots$
- \CASE{} $label_{n1} \ldots label_{nj_n}$ $e_n: s_n$
+\SWITCH{} ($e$) \{
+ $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
+ $\ldots$
+ $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
\}
\end{dartCode}
@@ -5869,7 +5869,7 @@ If execution reaches the point after $s_h$ then a runtime error occurs, unless
\commentary{
-In other words, there is no implicit fall-through between cases. The last case in a switch (default or otherwise) can `fall-through' to the end of the statement.
+In other words, there is no implicit fall-through between non-empty cases. The last case in a switch (default or otherwise) can `fall-through' to the end of the statement.
}
\LMHash{}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698