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

[Feature request] Allow expr * 0 to be constant 0 #1402

Open
Rangi42 opened this issue Jun 13, 2024 · 0 comments
Open

[Feature request] Allow expr * 0 to be constant 0 #1402

Rangi42 opened this issue Jun 13, 2024 · 0 comments
Labels
enhancement Typically new features; lesser priority than bugs rgbasm This affects RGBASM
Milestone

Comments

@Rangi42
Copy link
Contributor

Rangi42 commented Jun 13, 2024

As of #1399, we allow expr && 0 and expr & 0 to be constant 0, and expr || non-0 to be constant 1.

expr * 0 should also be valid to allow as constant 0. I don't think there would be any issues with that, and it could be helpful with (cond * val1) + (!cond * val2) "ternaries".

@Rangi42 Rangi42 added enhancement Typically new features; lesser priority than bugs rgbasm This affects RGBASM labels Jun 13, 2024
@Rangi42 Rangi42 added this to the v0.9.0 milestone Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Typically new features; lesser priority than bugs rgbasm This affects RGBASM
Projects
None yet
Development

No branches or pull requests

1 participant