一、 基础数据类型
- 数据类型
基础数据类型:int / float / double / char / bool / void / enum枚举类型/ long / short / signed有符号类型变量/ struct结构体变量/ union声明共用体(联合)数据类型/ unsigned 声明无符号类型变量
指针数据类型:class / id



2.数据类型转化
基础数据类型转换:容量从大到小转换为强制转换,需要加强制转换符,double –> float–> long–> int–> char/ short/Byte
一、 OC运算符

逻辑运算符

运算符优先级

自加自减运算符
++ / --
二、 if条件语句、swtch语句、循环语句
if (0 == count){
}else if (1 == count) {
}else{
}
switch (expression)
{
case value1:
...
break; // 跳出整个循环语句
case value2:
...
break;
case value3:
...
break;
default:
...
break;
}
for (int x = 0; x<10; x++){
}
int a = 0;
while (a < 5) {
nslog(@”%d”,a);**
if (a == 1) {
continue;//跳出当次循环,输入结果0134
}
a++;
}
网友评论