iOS bool Bool boolean Boolean

来源:互联网 发布:省市区三级联动sql结构 编辑:程序博客网 时间:2024/05/18 17:02

boolean 是int型

Boolean 是char型  Boolean mac os上有历史意义的类型

BOOL 是unsigned char型,BOOL b 当b=1 b=YES //IOS Style

bool 是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");//通过测试
屏幕快照-2013-01-09-10.48.40-AM.png

0 0
原创粉丝点击