Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6313

Add support for 0b/0B as base 2 (binary) number

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Accepted
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:
    • Epic Link:
    • Sub-team:
    • Team:
      Froyo
    • Release Notes:
      New Feature
    • Release Notes Summary:
      It is now possible to directly enter numeric data values in binary form (base 2) using a prefix of {{0b}} or {{0B}}.

      Description

      Some kinds of resources deal with information at the bit level and it is beneficial if puppet can support binary numeric values directly in the language.

      A prefix of 0b or 0B should be taken as the start of a binary number. The lexer should recognize this, as well as the automatic 'string to numeric' conversion that takes place when arithmetic is performed on numbers.

      String.new() already handles formatting of binary numeric with several formatting rules.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            henrik.lindberg Henrik Lindberg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Zendesk Support