0
点赞
收藏
分享

微信扫一扫

IOS中boolean Boolean B…

小暴龙要抱抱 2023-03-30 阅读 49

boolean 是int型
Boolean mac os上有历史意义的类型
 BOOL 是unsigned char型,BOOL b 当b=1 b=YES //IOS Style
是int型,bool b 当b>1 b=YES //c /C++style
 

 boolean_t t1 = 1;//int type
 Boolean t2 = 1; //unsigned char type
 BOOL t3 = 4;//YES or NO
 bool t4 = 1;//true or false NSAssert(t1, @"boolean_t t1 is NO");//通过测试
 NSAssert(t2, @"boolean_t t2 is NO");//通过测试
 NSAssert(t3, @"boolean_t t3 is NO");//通过测试
 NSAssert(t4, @"boolean_t t4 is NO");//通过测试
 

举报

相关推荐

0 条评论