It was 1984. Company called Stepstone made it. Created by Brad Cox and Tom Love. The reason for that is to create an effort to get people to write cleaner, more modular, and clearly separated code.
Objective-C is the primary programming language you use when writing software for OS X and iOS. It's a superset of the C programming language and provides object-oriented capabilities and a dynamic runtime.
The General purpose is object-oriented using smalltalk -style messing to the c programing language. main programming language used by Apple.
To add notes about the code or comment out sections of code that just aren't working you can use single line comments using the // marker
This is a restriction in the Objective-C language and many other languages, but this helps keeping variable names tidy.
switch(expression){
case constant-expression :
statement(s);
break; /* optional */
case constant-expression :
statement(s);
break; /* optional */
/* you can have any number of case statements */
default : /* Optional */
statement(s);
}
Boolean expression followed by one or moree statments. if the boolean expression turns out to be true then the code will be executed.
/* statement(s) will execute if the boolean expression is true */
}
^{
NSLog(@"This is a block");
}
if(myString != NSNull && myString.length) { ... }
#import <Foundation/Foundation.h>
int main () {
/* for loop execution */
int a;
for( a = 10; a < 20; a = a + 1 ) {
NSLog(@"value of a: %d\n", a);
}
return 0;
}
#import <Foundation/Foundation.h>
int main () {
/* local variable definition */
int a = 10;
/* while loop execution */
while( a < 20 ) {
NSLog(@"value of a: %d\n", a);
a++;
}
return 0;
}