summaryrefslogtreecommitdiffstats
path: root/docs/language-reference/06-statements.md
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2021-12-20 16:56:01 -0500
committerGitHub <noreply@github.com>2021-12-20 16:56:01 -0500
commit1efa01f584924149a2bb957d1092ca29e4feac37 (patch)
treed3d6f48a2bf366557002874c1228ab61e0a2b42c /docs/language-reference/06-statements.md
parent3b6fff2235320d0a7283ef5d043623dcd8390a70 (diff)
Hotfix/doc typos2 (#2064)
* #include an absolute path didn't work - because paths were taken to always be relative. * Fix typos in docs.
Diffstat (limited to 'docs/language-reference/06-statements.md')
-rw-r--r--docs/language-reference/06-statements.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/language-reference/06-statements.md b/docs/language-reference/06-statements.md
index f861ba299..daed30a67 100644
--- a/docs/language-reference/06-statements.md
+++ b/docs/language-reference/06-statements.md
@@ -93,10 +93,10 @@ case 1:
doBasicThing();
break;
-// this is another swithc case clause
+// this is another switch case clause
default:
- doAnotherThing();
- break;
+ doAnotherThing();
+ break;
```
A _case label_ consists of the keyword `case` followed by an expresison and a colon (`:`).
@@ -105,7 +105,7 @@ The expression must evaluate to a compile-time constant integer.
A _default label_ consists of the keyword `default` followed by a colon (`:`).
It is an error for a case label or default label to appear anywhere other than the body of a `switch` statement.
-It is an error for a statement to appear inside the body of a `switch` statemetn that is no part of a switch case clause.
+It is an error for a statement to appear inside the body of a `switch` statement that is no part of a switch case clause.
Each switch case clause must exit the `switch` statement via a `break` or other control transfer statement.
"Fall-through" from one switch case clause to another is not allowed.
@@ -172,7 +172,7 @@ A `break` statement transfers control to after the end of the closest lexically
break;
```
-### Continute Statement
+### Continue Statement
A `continue` statement transfers control to the start of the next iteration of a loop statement.
In a for statement with a side effect expression, the side effect expression is evaluated when `continue` is used: