Skip to content

Octal literals #6563

Description

@emberian

It's a strange omission. There are hex and binary literals, but no octal!

Activity

  1. emberian commented on May 17, 2013

    @emberian
    ContributorAuthor

    Proposed syntax: 0o432

  2. emberian commented on May 17, 2013

    @emberian
    ContributorAuthor

    An octal! macro would be equally acceptable.

  3. emberian commented on Jul 12, 2013

    @emberian
    ContributorAuthor

    Meh, closing, not important.

  4. setharnold commented on Nov 5, 2013

    @setharnold

    Please reconsider this feature request; Unix permissions are most easily expressed using octal permissions.

    While expressing permissions via binary 0b111_101_101 is workable, I suspect most of us would do the mental arithmetic to re-write that to 0o755. Clever macros can mask some of this -- see e.g., https://gist.github.com/kmcallister/7312179 -- but asking each chmod() or umask() user to either re-implement them or discover and import such a package feels awkward compared to supporting 0o ... syntax directly in the language.

    Thanks

  5. emberian commented on Nov 5, 2013

    @emberian
    ContributorAuthor
  6. reopened this on Nov 5, 2013
  7. emberian commented on Feb 13, 2014

    @emberian
    ContributorAuthor

    Since fixed.

  8. added a commit that references this issue on Oct 7, 2021
    f8303ad
  9. added a commit that references this issue on Aug 21, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions