@@ -1878,7 +1878,7 @@ were declared without the @code{!} annotation, the following code would not
1878
1878
typecheck:
1879
1879
@example
1880
1880
fn f(i: int) -> int @{
1881
- if ( i == 42) @{
1881
+ if i == 42 @{
1882
1882
ret 42;
1883
1883
@}
1884
1884
else @{
@@ -3056,7 +3056,7 @@ and transfers control to the caller frame.
3056
3056
An example of a @code {ret } expression:
3057
3057
@example
3058
3058
fn max(a: int, b: int) -> int @{
3059
- if ( a > b) @{
3059
+ if a > b @{
3060
3060
ret a;
3061
3061
@}
3062
3062
ret b;
@@ -3081,7 +3081,7 @@ last expression in a block.
3081
3081
An example of a @code {be } expression:
3082
3082
@example
3083
3083
fn print_loop(n: int) @{
3084
- if ( n <= 0) @{
3084
+ if n <= 0 @{
3085
3085
ret;
3086
3086
@} else @{
3087
3087
print_int(n);
@@ -3304,9 +3304,9 @@ for each s: str in str::split(txt, "\n") @{
3304
3304
@cindex Control-flow
3305
3305
3306
3306
An @code {if } expression is a conditional branch in program control. The form of
3307
- an @code {if } expression is a parenthesized condition expression, followed by a
3308
- consequent block, any number of @code {else if } conditions and blocks, and an
3309
- optional trailing @code {else } block. The condition expressions must have type
3307
+ an @code {if } expression is a condition expression, followed by a consequent
3308
+ block, any number of @code {else if } conditions and blocks, and an optional
3309
+ trailing @code {else } block. The condition expressions must have type
3310
3310
@code {bool }. If a condition expression evaluates to @code {true }, the
3311
3311
consequent block is executed and any subsequent @code {else if } or @code {else }
3312
3312
block is skipped. If a condition expression evaluates to @code {false }, the
0 commit comments