if(flag2){
NSLog(@"真 %d",flag2);
}
else{
NSLog(@"假 %d",flag2);
}
2)OC中的异常机制
@try {
<#Code that can potentially throw an exception#>
}
@catch (NSException *exception) {
<#Handle an exception thrown in the @try block#>
}
@finally {
<#Code that gets executed whether or not an exception is thrown#>
}
*/