NSDecimalCopy
十進数の値をコピーします
void NSDecimalCopy ( NSDecimal * destination , const NSDecimal * source );
解説
十進数の値をコピーします。
返り値
引数
( NSDecimal * )destination
( const NSDecimal * )source
フレームワーク
Foundation
クラス
NSDecimalCopy
Function
使用可能
10.0
参照
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSDecimalNumber *dNum1 = [[[NSDecimalNumber alloc] initWithString:@"100"] autorelease]; NSDecimal source = [dNum1 decimalValue]; NSDecimalNumber *dNum2 = [[[NSDecimalNumber alloc] initWithString:@"99.9999"] autorelease]; NSDecimal destination = [dNum2 decimalValue]; NSDecimal result; NSDecimalCopy(&destination,&source); NSLog(NSDecimalString(&destination,nil)); } @end