Skip to content

Support for 64-bit integers in JavaScript #183

Open
@elopez

Description

@elopez

I am currently trying to compute a value that is scattered around using an instance, similar to the following example:

  something:
    seq:
      - id: a
        type: u1
      - type: b24
      - id: b
        type: u4
    instances:
      fullthing:
        value: '(a<<32) + b'

However this doesn't currently work, as the value is assumed to be a 32 bit integer and the calculation overflows. There is no way that I can see to tell it to use 64 bit arithmetic. Allowing "type: u8" or providing a way to "grow" types in this context would come in really handy for this use case.

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