修复一个AUL恢复负数的Bug, dmp格式恢复不受影响

BINARY AUL (Bug) AUL (Fixed) SQLPLUS Result
c107 6 6 6  
3e5f66 -6 -6 -6  
3f2966 -0.60 -0.60 -.6  
3f5f66 -0.06 -0.06 -.06  
402966 -0.0060 -0.0060 -.006  
405f66 -0.0006 -0.0006 -.0006  
3e2966 -60 -60 -60  
3d5f66 -6 -600 -600 Error
3d2966 -60 -6000 -6000 Error
3c5f66 -600 -60000 -60000 Error
3b5f65655c66 -6000009 -6000009 -6000009  
3b5f66 -60000 -6000000 -6000000 Error
3c53493866 -182845 -182845 -182845  
3c5349382466 -182845.65 -182845.65 -182845.65 
3e532466 -18.65 -18.65 -18.65  

正数不受影响.

留言 (1)

不知道我这样写有没有问题,没测试过这么多情况,呵呵

if( flag > 0x80 )/* 正数 */
{
index = flag - 0xc1 ;
for( i = 1 ; i colsize ; i++ )
{
memcpy( &num, S_coldata->coldata+i, sizeof(uub1) ) ;
number_tmp += ( num - 0x01 ) * pow(100,index) ;
index-- ;
}
}
if( flag colsize ; i++ )
{
memcpy( &num, S_coldata->coldata+i, sizeof(uub1) ) ;
if( num == 0x66 )
break ;
number_tmp -= ( 0x65 - num ) * pow(100,-index) ;
index++ ;
}
}
if( flag == 0x80 ) /* 0 */

发表留言:

« Previous | Main | Next »

英语900句 | English 900

  • Make it an hour and a half. We have to get more food.
  • 等一个半小时吧, 我们还得多准备些事物.
  • Shall we ask Betty to join us?
  • 我们应该叫贝蒂一起去吗?
  • I put myself entirely in your hands.
  • 我按你说的办.
  • Can you tell me the phone number of the inquiry office?
  • 您能告诉我问讯处的电话号码吗?
  • Do you like to take a local train or an express?
  • 你想坐普通车还是特快?