Skip to content

Commit

Permalink
Fix logic in ? docstring example (#55945)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored Oct 1, 2024
1 parent 4eb2e47 commit 81ce6a4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions base/docs/basedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -937,11 +937,14 @@ expression, rather than the side effects that evaluating `b` or `c` may have.
See the manual section on [control flow](@ref man-conditional-evaluation) for more details.
# Examples
```
```jldoctest
julia> x = 1; y = 2;
julia> x > y ? println("x is larger") : println("y is larger")
y is larger
julia> x > y ? println("x is larger") : println("x is not larger")
x is not larger
julia> x > y ? "x is larger" : x == y ? "x and y are equal" : "y is larger"
"y is larger"
```
"""
kw"?", kw"?:"
Expand Down

0 comments on commit 81ce6a4

Please sign in to comment.