NSSwapShort
指定した数値の上位バイトと下位バイトの交換をします
unsigned short NSSwapShort ( unsigned short inv );
解説
指定した数値の上位バイトと下位バイトの交換をします。
返り値
引数
( unsigned short )inv
フレームワーク
Foundation
クラス
NSSwapShort
Function
使用可能
10.0
参照
NSSwapInt
NSSwapLong
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { unsigned short aNum = 1;//0000 0001 unsigned short bNum ; bNum = NSSwapShort (aNum); NSLog([NSString stringWithFormat:@"%d",bNum]);//0001 0000 } @end