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

Logical Boolean operators #478

Merged
merged 6 commits into from
Apr 10, 2024
Merged

Conversation

a740g
Copy link
Contributor

@a740g a740g commented Apr 6, 2024

Closes #211

This PR implements three Boolean logical operators:

  1. _NEGATE: A unary logical operator that performs logical negation on a Boolean expression.
  2. _ANDALSO: A binary logical operator that performs short-circuiting logical conjunction on two Boolean expressions.
  3. _ORELSE: A binary logical operator that performs short-circuiting logical inclusion on two Boolean expressions.

A test is included to ensure we get the expected behavior.

@a740g a740g added the enhancement New feature or request label Apr 6, 2024
@a740g a740g self-assigned this Apr 6, 2024
Copy link
Member

@RhoSigma-QB64 RhoSigma-QB64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as advertised :)

@a740g a740g merged commit 9ec149b into QB64-Phoenix-Edition:main Apr 10, 2024
4 checks passed
@a740g a740g deleted the logical-operators branch April 10, 2024 17:33
@a740g a740g mentioned this pull request May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Boolean short-circuiting versions of AND and OR
2 participants