[swift-users] Printing large hexadecimal values

Jens Alfke jens at mooseyard.com
Wed May 25 15:19:31 CDT 2016


> On May 25, 2016, at 12:10 PM, Ken Burgett <kenb at iotone.io> wrote:
> 
> You are correct, the "%llx" works for UInt64, while "%16x" does not. "%llX" also works, producing an uppercase string.
> Should this be reported as a bug?

No, it’s correct behavior. You need to use the “ll” ("long long") modifier to specify that the parameter is a 64-bit value.

—Jens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160525/35ee89bf/attachment.html>


More information about the swift-users mailing list