forked from OSchip/llvm-project
Added equivalent method calls in examples.
llvm-svn: 155155
This commit is contained in:
parent
46d611a227
commit
81a256a909
|
@ -111,15 +111,15 @@ are supported:</p>
|
|||
|
||||
<pre>
|
||||
// numbers.
|
||||
NSNumber *smallestInt = @(-INT_MAX - 1);
|
||||
NSNumber *piOverTwo = @(M_PI / 2);
|
||||
NSNumber *smallestInt = @(-INT_MAX - 1); // [NSNumber numberWithInt:(-INT_MAX - 1)]
|
||||
NSNumber *piOverTwo = @(M_PI / 2); // [NSNumber numberWithDouble:(M_PI / 2)]
|
||||
|
||||
// enumerated types.
|
||||
typedef enum { Red, Green, Blue } Color;
|
||||
NSNumber *favoriteColor = @(Green);
|
||||
NSNumber *favoriteColor = @(Green); // [NSNumber numberWithInt:((int)Green)]
|
||||
|
||||
// strings.
|
||||
NSString *path = @(getenv("PATH"));
|
||||
NSString *path = @(getenv("PATH")); // [NSString stringWithUTF8String:(getenv("PATH"))]
|
||||
NSArray *pathComponents = [path componentsSeparatedByString:@":"];
|
||||
</pre>
|
||||
|
||||
|
|
Loading…
Reference in New Issue