objective-c codes:
#import <Foundation/Foundation.h>
BOOL areIntsDifferent(int thing1,int thing2)
{
if (thing1==thing2) {
return (NO);
}else{
return (YES);
}
} NSString *boolString(BOOL yesNo)
{
if (yesNo==NO) {
return (@"No");
}else{
return (@"Yes");
}
} int main(int argc,const char *argv[])
{
BOOL areTheyDifferent;
areTheyDifferent=areIntsDifferent(, );
NSLog(@"are %d and %d different? %@",,,boolString(areTheyDifferent));
areTheyDifferent=areIntsDifferent(, );
return ();
}
console:
2013-09-13 15:06:29.452 BOOL Party[1821:303] are 5 and 5 different? No