【发布时间】:2011-07-02 13:34:32
【问题描述】:
您好,我正在使用 sqlite。 stringFloat1 = [pediDetails.doseTo FloatValue];
float mulWith1 = [appDelegate.selectedWeight FloatValue];
NSLog(@"mulwith1:%f",mulWith1);
//if(mulWith1 =0.00) {
// int temp1=0;
//}
// else {
float temp1 = stringFloat1*mulWith1;
NSString *setWeight;
NSLog(@"temp1:%f",temp1);
// }
//float temp1;
//NSString *setWeight = [NSString stringWithFormat:@"%.02f",temp,temp1];
//if(temp1=0.00) {
//setWeight = [NSString stringWithFormat:@"%.02f",temp];
//}
//else{
setWeight = [NSString stringWithFormat:@"%.02f-%.02f",temp,temp1];
我需要的是,如果 temp1 为 0.00,那么应该只显示温度值。条件是什么?
【问题讨论】:
标签: iphone-sdk-3.0 ios4 ios-simulator