Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Objective C by asdasdgg ( 7 years ago )
// stała (ang. Constant)
#define WIDTH 50
const int HEIGHT = 10
// zmienna (ang. Variable)
char c, ch;
int d = 3;
c = 'f'
// If statement
if (boolean) {
//
} else if (boolean2) {
} else {
}
// Switch statement
switch(expression){
case constant-expression :
statement(s);
break; /* optional */
case constant-expression :
statement(s);
break; /* optional */
default : /* Optional */
statement(s);
}
// The ? : Operator
Exp ? Exp2 : Exp3;
// Pętla For
int a;
for(a = 0; a< 10; a++) {
}
// Pętla While
a = 10;
while (a < 20) {
a++;
}
// Pętla do...while
int a = 10;
do {
a++;
} while (a < 20);
// String
NSString *str1 = @"Hello";
NSString *str2 = @"World!";
NSString *str3;
str3 = [[NSString alloc] initWithFormat:@"%@ %@",str1,str2];
NSLog(@"Using initWithFormat: %@\n", str3 ); // Using initWithFormat: Hello World
Revise this Paste
Children: 96957