Skip to content

Feature Request: Add binary literal #2183

Open
@Inc0n

Description

@Inc0n

Quick Summary:
Add binary literal syntax to elm, such as 0b1010 would to 10 in decimal.

SSCCE

Enter the following in elm repl

> 0b111
|
-- WEIRD NUMBER ----------------------------------------------------------- REPL

I thought I was reading a number, but I ran into some weird stuff here:

3|   0b111
      ^
I recognize numbers in the following formats:

    42
    3.14
    6.022e23
    0x002B

So is there a way to write it like one of those?
  • Elm: 0.19.1
  • Browser: Firefox
  • Operating System: Linux 5.11.4-arch1-1

Additional Details

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions