File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,12 @@ declaration until the end of the enclosing block scope.
36
36
37
37
## Expression statements
38
38
39
- An _ expression statement_ is one that evaluates an [ expression] ( expressions.html )
40
- and ignores its result. The type of an expression statement ` e; ` is always
41
- ` () ` , regardless of the type of ` e ` . As a rule, an expression statement's
42
- purpose is to trigger the effects of evaluating its expression.
39
+ An _ expression statement_ is one that evaluates an
40
+ [ expression] ( expressions.html ) and ignores its result. The type of an
41
+ expression statement ` e; ` is always ` () ` , regardless of the type of ` e ` . As a
42
+ rule, an expression statement's purpose is to trigger the effects of evaluating
43
+ its expression. [ Block expressions] ( expressions.html#block-expressions ) and
44
+ control flow expressions, such as [ ` loop `
45
+ expressions] ( expressions.html#infinite-loops ) and [ ` if `
46
+ expressions] ( expressions.html#if-expressions ) , which evaluate to ` () ` can be
47
+ used as statements without a trailing semicolon.
You can’t perform that action at this time.
0 commit comments