//程式碼如下
- (void)viewDidLoad
{
[super viewDidLoad];
int a = 2;
NSArray* b = @[@2];
NSLog(@"before:a=%d b=%@",a,b);
[self testInt:a Object:b];
NSLog(@"after:a=%d b=%@",a,b);
}
-(void) testInt:(int)a Object:(NSArray*) b{
a = 1;
b = @[@1];
NSLog(@"processing:a=%d b=%@",a,b);
}
//Log如下
2014-02-13 13:26:54.160 testParse[11196:70b] before:a=2 b=(
2
)
2014-02-13 13:26:54.161 testParse[11196:70b] processing:a=1 b=(
1
)
2014-02-13 13:26:54.163 testParse[11196:70b] after:a=2 b=(
2
)
沒有留言:
張貼留言