Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing documentation for ? #1236

Open
ShalokShalom opened this issue Sep 1, 2023 · 0 comments
Open

Missing documentation for ? #1236

ShalokShalom opened this issue Sep 1, 2023 · 0 comments

Comments

@ShalokShalom
Copy link
Contributor

If I hover over the ? operator, I get no info box on it.

Out of the REPL help:

a ? b : c

Short form for conditionals; read "if a, evaluate b otherwise evaluate c". Also known as the ternary operator
(https://en.wikipedia.org/wiki/%3F:).

This syntax is equivalent to if a; b else c end, but is often used to emphasize the value b-or-c which is being used as part of a
larger expression, rather than the side effects that evaluating b or c may have.

See the manual section on control flow for more details.

Examples
≡≡≡≡≡≡≡≡≡≡

julia> x = 1; y = 2;

julia> x > y ? println("x is larger") : println("y is larger")
y is larger

Can we include this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant