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

Add bindings for adjacent fix-width numerical conversions and flesh out docs #585

Merged
merged 20 commits into from
Aug 21, 2023

Conversation

kentosugama
Copy link
Contributor

@kentosugama kentosugama commented Aug 11, 2023

Expose these: dfinity/motoko#4139
Converting to adjacent fix-width types for:

  • Int8

  • Int16

  • Int32

  • Int64

  • Nat8

  • Nat16

  • Nat32

  • Nat64

And fleshing out the documentation for these modules to be up to standard with the Nat and Int modules.

@kentosugama kentosugama self-assigned this Aug 15, 2023
@kentosugama kentosugama changed the title Add bindings for adjacent fix-width numerical conversions Add bindings for adjacent fix-width numerical conversions and flesh out docs Aug 16, 2023
@kentosugama kentosugama marked this pull request as ready for review August 18, 2023 19:55
src/Nat16.mo Outdated Show resolved Hide resolved
Copy link
Contributor

@luc-blaeser luc-blaeser left a comment

Choose a reason for hiding this comment

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

This is very nice! Also a big amount of work.

@kentosugama
Copy link
Contributor Author

Thank you for the review @luc-blaeser

@kentosugama kentosugama merged commit 452b7db into master Aug 21, 2023
4 checks passed
@kentosugama kentosugama deleted the expose-num-conversions branch August 21, 2023 15:58
@crusso
Copy link
Contributor

crusso commented Aug 21, 2023

Yes, nice work!

It's merged already but there's small typo in all the toText explanations. "Textual representation" -> "Textual representations". Also the reference to the original underscore syntax is because Motoko accepts underscores as thousand separators in literal (not commas). Probably not worth fixing.

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.

3 participants