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

Support hex & binary numbers #78

Closed
skx opened this issue Nov 6, 2022 · 0 comments · Fixed by #79
Closed

Support hex & binary numbers #78

skx opened this issue Nov 6, 2022 · 0 comments · Fixed by #79
Assignees

Comments

@skx
Copy link
Owner

skx commented Nov 6, 2022

My (embedded) usage is more annoying than it has to be because we can't operate upon bits easily.

These should both just work:

(print "%d" 0xff)
(print "%d" 0b01010101)

Making the change is trivial, and would benefit others.

Not sure if I need to port my bit-manipulation operations, but since it's all tied to the hardware it's probably not so worthwhile.

@skx skx self-assigned this Nov 6, 2022
skx added a commit that referenced this issue Nov 6, 2022
This closes #78 by adding native support for hexadecimal and binary
literals.  For example:

* `(print 0xff)`
* `(print 0b00000010)`
@skx skx closed this as completed in #79 Nov 6, 2022
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 a pull request may close this issue.

1 participant