Advertisement
Guest User

Untitled

a guest
Jun 27th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. if num == .One || num == .Two || num == .Three || num == .Four {
  2. //code
  3. }
  4.  
  5. switch num {
  6. case .One, .Two. Three, .Four:
  7. //code
  8. default:
  9. print("do nothing but I still need to put something here")
  10. }
  11.  
  12. if case .One, .Two, .Three, .Four == num {
  13. //code
  14. }
  15.  
  16. If [.One, .Two, .Three, .Four].contains(num) {
  17.  
  18. enum Number {
  19. case One, Two, Three, Four
  20. }
  21.  
  22. switch num {
  23. case .One, .Two, Three, .Four:
  24. /* do something*/
  25. break
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement