Skip to content

Print more integers properly. #4

@otrho

Description

@otrho

Right now we can only print numbers between 0 and 999 correctly, and even then it's with leading spaces.

Ideally we could do negatives and more digits, without the leading spaces. Ideally we'd just call printf but Cranelift doesn't support varargs yet. So a bespoke version is going to need to reserve storage to store digits, LSB to MSB. It'll need to either reverse the bytes in storage and then call puts or it could putchar the digits in the right order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions