Created
July 26, 2015 08:17
-
-
Save GE-N/1657bfd42a8e9cd3681f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// (1) | |
// Get report by month | |
// without Enum | |
-(Report *)reportFor:(int)month { | |
... | |
} | |
Report *reportMay = self.reportFor(5) // Report for May | |
// ======================================================== // | |
// (2) | |
// Get report by month | |
// with Enum | |
typedef enum Month { | |
January = 0, | |
February, | |
March, | |
April, | |
May, | |
June, | |
July, | |
August, | |
October, | |
November, | |
December | |
} | |
(Report *)reportFor:(Month)month { | |
... | |
} | |
Report *reportMay = self.reportFor(May) // Report for May |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment