justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.

Name: Ask: Human (enter yes):
[back to index] | [unreplied] | [replied] | [recent comments] | [all]

Question: Do we need a built-in print format specifier for WDL_INT64/WDL_UINT64 in wdltypes.h?
Asked by Gio (62.103.216.x) on March 13 2019, 3:21pm
Reply on March 13 2019, 7:46pm (edited at March 13 2019, 7:47pm):
    Might be helpful yeah. I'm usually lazy and find that 53 bits is normally enough for me, so I'll often just use printf("%.0f",(double)int64val);

  • Posted by Tale (77.170.68.x) on March 14 2019, 10:01am:
    FYI: printf("%lld", int64val) seems to work on most modern compilers (and likewise %llu and %llX for unsigned or hex).

  • Posted by Gio (62.103.216.x) on March 14 2019, 11:17am:
    @Tale: %lld seem to work but since WDL_INT64 variant is (VC++ basic type) __int64 for windows better stay with %I64d?

  • Posted by Tale (77.170.68.x) on April 10 2019, 6:13am:
    [Better late than never, oops...] I believe that %lld and %I64d are equivalent nowadays, but older MSVC only supported %I64d.

  • Posted by Gio (79.130.176.x) on April 11 2019, 9:48am:
    @Tale: You are incredible, thanks. I believe the same too but the usual nerdy annoyances surface for not doing the "right" way, etc.

    Your Name:   -- Site Owner's Name:  (for human-verification)


[back to index] | [unreplied] | [replied] | [recent comments] | [all]
Copyright 2019 Justin Frankel. | RSS