|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
| I added a new section to the Objective-C literals document: This describes the syntax we are implementing for boxed expressions. This lets you write code like: // numbers. NSNumber *smallestInt = @(-INT_MAX - 1); NSNumber *piOverTwo = @(M_PI / 2); // enumerated types.
typedef enum { Red, Green, Blue } Color;
NSNumber *favoriteColor = @(Green);
// strings.
NSString *path = @(getenv("PATH"));
NSArray *pathComponents = [path componentsSeparatedByString:@":"];- Patrick |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Objc-language mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.