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

Binary Number support #31

Closed
Tracked by #277
x87 opened this issue Jul 9, 2020 · 3 comments
Closed
Tracked by #277

Binary Number support #31

x87 opened this issue Jul 9, 2020 · 3 comments
Labels
priority:p2 Medium priority scope:compiler type:feature New feature or request
Milestone

Comments

@x87
Copy link
Collaborator

x87 commented Jul 9, 2020

Currently Sanny supports decimal numbers (both whole integers and floating-point number) and hexadecimal numbers.

-1, 0, 1, 1.0, 0.0. -1.0 - decimal
0x0, 0x100, 0xFF - hexadecimal

In some cases it's useful to represent a number in binary form (as a sequence of zeros and ones). E.g. bitmask values. In other programming languages it's common to see such representation with the prefix 0b and zeros and ones following:

0b0, 0b010100

This format should be the first-class citizen and supported anywhere a number is allowed.

@x87 x87 added type:feature New feature or request scope:compiler priority:p2 Medium priority labels Jul 9, 2020
@x87
Copy link
Collaborator Author

x87 commented Nov 27, 2020

could be helpful addition to #97

@x87 x87 added this to the v4.0.0 milestone Nov 5, 2023
@x87 x87 mentioned this issue Nov 5, 2023
59 tasks
@x87
Copy link
Collaborator Author

x87 commented Nov 5, 2023

consider adding IDE conversion tool similar to Ctrl+H for hexadecimal numbers

edit: added Ctrl+B (can be redefined in options)

@x87
Copy link
Collaborator Author

x87 commented Aug 7, 2024

released in 4.0.0

@x87 x87 closed this as completed Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:p2 Medium priority scope:compiler type:feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant