Last active
August 29, 2015 13:57
-
-
Save alloy/9830968 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
#import <Foundation/Foundation.h> | |
@interface WTF : NSObject | |
-:x; | |
@end | |
@implementation WTF | |
-:x; | |
{ | |
return x; | |
} | |
@end | |
int | |
main() | |
{ | |
NSLog(@"%@", [[WTF new] :@(42)]); | |
return 0; | |
} |
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
$ /Users/eloy/Code/ObjectiveC/objc-run/objc-run test.m | |
2014-03-28 12:53:53.665 test[93801:507] 42 |
Same here! Thanks for pointing out objc-run!
Now make a method that accepts no arguments ;)
It still has a name. Its name is :
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I didn't know about objc-run before. I was using CodeRunner for such things. Thanks! :)