long code = (long) aa;
NSLog ([[NSString alloc] initWithFormat: @ "% d", code]);
Why log which is not 123456789
long code1 = 123456789;
NSLog ([[NSString alloc] initWithFormat: @ "% d", code1]);
Given directly to a digital log of which is 123456789
Reply:
When only concerned with logic design can be, because the reality is very simple, just to the calculation results can be converted into NSString. The NSString converted to digital logic to their own feeling is asking for trouble.
Reply:
char * cLong = [aa utf8String];
long tempLong = (long) cLong;
uft8String this message may not be called the name of children, but there should be
Reply:
long code = [aa longLongValue];
NSString provides several ways to convert a string of digits intValue, integerValue, floatValue, detailed look at help.
No comments:
Post a Comment