December 2012
Beginner
552 pages
12h 58m
English
Now that you are familiar with the steps involved in compiling and running Objective-C programs, let’s take a closer look at this first program. Here it is again:
// First program example#import <Foundation/Foundation.h>int main (int argc, const char * argv[]){ @autoreleasepool { NSLog (@"Programming is fun!"); } return 0;}
In Objective-C, lowercase and uppercase letters are distinct. Also, Objective-C doesn’t care where on the line you begin typing—you can begin typing your statement at any position on the line. You can use this to your advantage in developing programs that are easier to read.
The first seven lines of the program introduce the concept of the comment. A comment statement is used in ...
Read now
Unlock full access