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

Use longer form of logical operators (&& and ||) in if statements. #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mcol
Copy link

@mcol mcol commented Jul 27, 2021

The single-character operators (& and |) are for elementwise operations, but if statements don't work on vectors. Using the longer form has also the advantage of not evaluating the second operand if the result is known after evaluating the first.

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

Successfully merging this pull request may close these issues.

1 participant