Advertisement
Guest User

Untitled

a guest
Jul 30th, 2014
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. if(i== x || i == y || i == z )
  2.  
  3. if (i == ( x || y || z ))
  4.  
  5. switch (i) {
  6. case x:
  7. case y:
  8. case z:
  9. ....some code....
  10. break
  11. default:
  12. ....some other code....
  13. }
  14.  
  15. NSArray *matchingNumbers = @[@1,@2,@3,@4,@5,@6,@7,@8];
  16. NSNumber *checkedNumber = @3;
  17. if ( [matchingNumbers indexOfObject:checkedNumber] != NSNotFound)
  18. {
  19. //...
  20. }
  21.  
  22. if ([myArray containsObject:i]) {
  23.  
  24. n = 0;
  25. while (n<49) {
  26. if (n==[myArray objectAtIndex:n]) {
  27. //OR statement returned true for one of the 50 objects...
  28. }
  29. }
  30.  
  31. if ((i==x)||(i==y)) {
  32. string=@"hello";
  33. }
  34.  
  35. string = ((i==x)||(i==y)) ? @"hello";
  36.  
  37. if ((i==x)||(i==y)) {
  38. string=@"hello";
  39. } else {
  40. string=@"goodbye";
  41. }
  42.  
  43. string = ((i==x)||(i==y)) ? @"hello" : @"goodbye";
  44.  
  45. myNumber = ((i==x)||(i==y))*(z+w);
  46.  
  47. if ([[[NSMutableArray alloc] initWithObjects:x,y,z,a,b,c,d,e,f,g,h,j,k,l,nil] containsObject:i]) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement