Skip to content

Commit

Permalink
update ternary operator
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Sep 24, 2023
1 parent 012d8dc commit 1a5aba9
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/common-concepts/control-flow/conditional.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,6 @@ fn main() {

The return value obtained in the code example above should be `1000`.

### Restrictions

Ternary operators have restrictions on binary expressions to reduce complexity. You cannot use a ternary operator in a binary expression.

For example:
```jule
if x >= 50 { test() } else { 100 } + 20
```

The example above is incorrect. Your compiler does not allow such usage.

### Constant Evaluation

Where possible, ternary expressions can be subject to constant evaluation optimization.
Expand Down

0 comments on commit 1a5aba9

Please sign in to comment.