<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I’m not sure what happened to <font face="Menlo" class="">String(format:)</font>, but I haven’t been able to get it to work either.<div class="">It’s printing its argument as a tuple.</div><div class=""><br class=""></div><div class="">I think variadic functions aren’t implemented in the dev version of Swift?</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class="">main.swift:3:1: error: 'printf' is unavailable: Variadic function is unavailable</font></div><div class=""><font face="Menlo" class="">printf("%0.2d", 4.555555555)</font></div><div class=""><font face="Menlo" class="">^~~~~~</font></div><div class=""><font face="Menlo" class="">SwiftGlibc.printf:2:13: note: 'printf' has been explicitly marked unavailable here</font></div><div class=""><font face="Menlo" class="">public func printf(__format: UnsafePointer<Int8>, _ varargs: Any...) -> Int32</font></div></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 10, 2015, at 4:39 PM, Isaac Gouy via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class="">For example,<br class=""><br class=""> print( String(format: "%.3f", 1.23489) )<br class=""><br class=""> $ /usr/local/src/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu15.10/bin/swiftc test.swift<br class=""><br class=""> $ ./test<br class=""> ("%.3f", 1.23489)<br class=""><br class="">Not 1.235<br class="">_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></div></div></blockquote></div><br class=""></div></body></html>