You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
832 B
46 lines
832 B
/*
|
|
* Copyright (c) 2014-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import "Boxing.h"
|
|
|
|
@implementation Boxing
|
|
|
|
- (NSNumber*)getIntExp {
|
|
int x = 4;
|
|
int y = 5;
|
|
NSNumber* n = [NSNumber numberWithInt:x + y];
|
|
return @(x + y);
|
|
}
|
|
|
|
- (NSNumber*)getInt {
|
|
NSNumber* n = [NSNumber numberWithInt:5];
|
|
return @5;
|
|
}
|
|
|
|
- (NSNumber*)getFloat {
|
|
NSNumber* n = [NSNumber numberWithFloat:1.5f];
|
|
return @1.5f;
|
|
}
|
|
|
|
- (NSNumber*)getDouble {
|
|
NSNumber* n = [NSNumber numberWithDouble:1.5];
|
|
return @1.5;
|
|
}
|
|
|
|
- (NSNumber*)getBool {
|
|
NSNumber* n = [NSNumber numberWithBool:YES];
|
|
return @YES;
|
|
}
|
|
|
|
- (NSString*)getS {
|
|
NSString* s = @(strdup("hello world"));
|
|
return [NSString stringWithUTF8String:"hello world"];
|
|
;
|
|
}
|
|
|
|
@end
|