Logo

Programming-Idioms

History of Idiom 2 > diff from v70 to v71

Edit summary for version 71 by alctyus:
[Obj-C] NSInteger is preferred over int for compatibility with 32-bit & 64-bit operating systems and better interop with Swift.

Version 70

2019-09-26, 15:14:24

Version 71

2019-09-26, 15:25:28

Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

Illustration

Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

Illustration
Code
for (int i=0;i<10;i++){
NSLog(@"Hello world");
}
Code
for (NSInteger i=0;i<10;i++){
NSLog(@"Hello world");
}