March 2014 update
This commit is contained in:
parent
09687c4926
commit
a25938f123
1846 changed files with 21876 additions and 5203 deletions
7
Task/Program-name/CoffeeScript/program-name.coffee
Normal file
7
Task/Program-name/CoffeeScript/program-name.coffee
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env coffee
|
||||
|
||||
main = () ->
|
||||
program = __filename
|
||||
console.log "Program: " + program
|
||||
|
||||
if not module.parent then main()
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
@autoreleasepool {
|
||||
|
||||
char *program = argv[0];
|
||||
printf("Program: %s\n", program);
|
||||
char *program = argv[0];
|
||||
printf("Program: %s\n", program);
|
||||
|
||||
// Alternatively:
|
||||
NSString *program2 = [[NSProcessInfo processInfo] processName];
|
||||
NSLog(@"Program: %@\n", program2);
|
||||
// Alternatively:
|
||||
NSString *program2 = [[NSProcessInfo processInfo] processName];
|
||||
NSLog(@"Program: %@\n", program2);
|
||||
|
||||
[pool drain];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue