@gparker The word "currently" has me worried, but, thats awesome.
-
-
-
-
@gparker@kongtomorrow Where are those documented? Last I checked the Apple docs say cast to long. - View other replies
-
@eridius@gparker@kongtomorrow https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html … But, as@kongtomorrow says, no explicit mention of NSU?Integer. -
@boredzo@eridius@kongtomorrow NS[U]Integer happen to be the "corresponding [un]signed integer type" on all four OSX and iOS architectures. -
@gparker@boredzo@eridius@kongtomorrow Thanks. I'd been casting to long too.
-
-
-
@gparker what are the z and t modifiers? -
-
@stephentyrone@gparker ah, so it'll only work as long as NS?Integer aligns with those types then. I wonder if that would ever change.
-
-
@gparker Hadn’t occurred to me to use the ptrdiff_t sizes for that. Thanks. -
@gparker I can’t wait to see how many people hardcoded, say, struct sizes instead of using sizeof() or offsetof(). -
-
@gparker Is there a rule somewhere about what modifiers to use? Or should we assume sizeof(size_t)==sizeof(ptrdiff_t)==sizeof(NSInteger)? -
@gparker The first one is for ssize_t. Did you mean %td? -
@gparker Nahhh, just cast to unsigned long, much better practice -
“
@gparker: %zd, %tu, %tx (signed, unsigned, hex) currently format NSInteger and NSUInteger with no warnings.” Well, that's interesting. -
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Greg Parker
zachary
Vincent Gable
Kevin Ballard
Petrifying Horror
Andy Lee
Yaakov
Jeff Kelley
Seth Willits
Filipe Cabecinhas
Jonathan Grynspan
iOSDev
Eshwar Ramesh
Chaitanya Gupta
Dan Anderson