Son*_*nic 3 boolean objective-c
我想打印一个BOOL(记录为有符号的char),没有任何编译器警告:
NSLog(@"Parsing Result = %hhd", parsingResult);
// inside some iOS program. Xocde 6
Run Code Online (Sandbox Code Playgroud)
但我得到"格式指定类型'char',但参数的类型为'BOOL'(又名'bool')".
Sud*_*eep 10
NSLog(parsingResult ? @"YES" : @"NO");
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3291 次 |
| 最近记录: |