Block declared variable visible outside?
- by fuzzygoat
If I declare a variable within a block (see below) is there a way to specify that its visible outside the block if need be?
if(turbine_RPM > 0) {
int intResult = [sensorNumber:1];
NSNumber *result = [NSNumber numberWithInt:intResult];
}
return result;
or is the way just to declare outside the block scope?
NSNumber *result;
if(turbine_RPM > 0) {
int intResult = [sensorNumber:1];
result = [NSNumber numberWithInt:intResult];
}
return result;
many thanks
gary