Skip to content

Binary Number support #31

Closed
Closed

Description

@x87

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.

Activity

  1. added
    type:feature
    priority:p2
    on Jul 9, 2020
  2. x87 commented on Nov 27, 2020

    @x87
    CollaboratorAuthor

    could be helpful addition to #97

  3. added this to the v4.0.0 milestone on Nov 5, 2023
  4. x87 commented on Nov 5, 2023

    @x87
    CollaboratorAuthor

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

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

  5. x87 commented on Aug 7, 2024

    @x87
    CollaboratorAuthor

    released in 4.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:p2scope:compilertype:feature

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions