1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-02-19 15:45:30 +01:00

minor update

This commit is contained in:
Yannick Loriot 2013-08-13 16:09:38 +02:00
parent 25f4c7e80a
commit 0970cb8010

View File

@ -36,13 +36,13 @@ int main (int argc, const char * argv[])
/////////////////////////////////////// ///////////////////////////////////////
// Primitive declarations // Primitive declarations
int myPrimitive1; int myPrimitive1 = 1;
long myPrimitive2; long myPrimitive2 = 234554664565;
// Object declarations // Object declarations
// Put the * in front of the variable names for strongly-typed object declarations // Put the * in front of the variable names for strongly-typed object declarations
MyClass *myObject1; // Strong typing MyClass *myObject1 = nil; // Strong typing
id myObject2; // Weak typing id myObject2 = nil; // Weak typing
// %@ is an object // %@ is an object
// 'description' is a convention to display the value of the Objects // 'description' is a convention to display the value of the Objects
NSLog(@"%@ and %@", myObject1, [myObject2 description]); // Print "(null) and (null)" NSLog(@"%@ and %@", myObject1, [myObject2 description]); // Print "(null) and (null)"