Skip to content

It is confusing that usage elements are displayed in XML as unadorned hexadecimal #20

Description

@mhagger

I must have stared at

<usage_minimum>01</usage_minimum>
<usage_maximum>12</usage_maximum>
<report_count>12</report_count>

a dozen (decimal; i.e, 0x0c) times before realizing, from looking at the C code equivalent, that it is broken. Does it really make sense for usage elements to be represented in hexadecimal in XML? If so, could they be written as 0x12 or 12h to make it clear to human readers that the values are hexadecimal? Or could there be a comment noting that fact?

For that matter, when reading XML, could numbers be self-describing? I.e., could 0x0c, 0Ch, and 12 all be considered equivalent representations of the same number? (Perhaps also 0b00001100.)

(I realize that it would be tricky to do this in a fully backwards-compatible way.)

Activity

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