<div dir="ltr">I&#39;m not sure this is strictly necessary, but I think it&#39;s a good idea to explicitly use the &quot;C*&quot; types when doing formatting with varargs, to make sure the calling convention matches what the callee expects:<div><br></div><div>    String(format: &quot;%llx&quot;, CLongLong(myNumber))</div><div class="gmail_extra">
<br><div class="gmail_quote">On Wed, May 25, 2016 at 1:19 PM, Jens Alfke via swift-users <span dir="ltr">&lt;<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><blockquote type="cite"><span class=""><div>On May 25, 2016, at 12:10 PM, Ken Burgett &lt;<a href="mailto:kenb@iotone.io" target="_blank">kenb@iotone.io</a>&gt; wrote:</div><br></span><span class=""><div><span style="font-family:Alegreya-Regular;font-size:15px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">You are correct, the &quot;%llx&quot; works for UInt64, while &quot;%16x&quot; does not. &quot;%llX&quot; also works, producing an uppercase string.</span><br style="font-family:Alegreya-Regular;font-size:15px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Alegreya-Regular;font-size:15px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Should this be reported as a bug?</span><br style="font-family:Alegreya-Regular;font-size:15px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"></div></span></blockquote></div><br><div>No, it’s correct behavior. You need to use the “ll” (&quot;long long&quot;) modifier to specify that the parameter is a 64-bit value.</div><div><br></div><div>—Jens</div></div><br>_______________________________________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br>
<br></blockquote></div><br></div></div>