#define MAX_DATACODEWORD 2956
WORD wData;
int nIndex;
BYTE m_byDataCodeWord[MAX_DATACODEWORD];--------------------------------------
if (wData & (1 << (ncData - i - 1)))
{
  m_byDataCodeWord[(nIndex + i) / 8] |= 1 << (7 - ((nIndex + i) % 8));
}
--------------------------------------
主要是线条中间的部分。

解决方案 »

  1.   

    if (wData & (1 < < (ncData - i - 1))) 

      m_byDataCodeWord[(nIndex + i) / 8] |= 1 < < (7 - ((nIndex + i) % 8)); 
    } if (wData and (1 shl (ncData - i - 1)))
    begin
      m_byDataCodeWord[(nIndex + i) / 8] = m_byDataCodeWord[(nIndex + i) / 8] or 
                                           (1 shl (7 - ((nIndex + i) mod 8))); 
    end;
      

  2.   

    加上  then   丢了不好意思
      

  3.   

    const 
      MAX_DATACODEWORD = 2956;
     
      wData : DWord;
      nIndex: Integer;
      m_byDataCodeWord : array[0..MAX_DATACODEWORD] of byte;
      
      if (wData and (1 shl (ncData - i - 1))) then
      begin
        m_byDataCodeWord[(nIndex + i) div 8] :=1 shl (7 - ((nIndex + i) / 8));  end;
     
      

  4.   


    const 
      MAX_DATACODEWORD = 2956;   wData : DWord; 
      nIndex: Integer; 
      m_byDataCodeWord : array[0..MAX_DATACODEWORD] of byte; 
      
      if (wData and (1 shl (ncData - i - 1))) then 
      begin 
        m_byDataCodeWord[(nIndex + i) div 8] :=1 shl (7 - ((nIndex + i) mod 8));     end; ..................
      

  5.   

    //#define MAX_DATACODEWORD 2956 
    const MAX_DATACODEWORD = 2956;
    //WORD wData; 
    wdata:word;
    //int nIndex; 
    nIndex:integer;
    //BYTE m_byDataCodeWord[MAX_DATACODEWORD]; 
    m_byDataCodeWord:array[0..MAX_DATACODEWORD-1] of byte;-------------------------------------- 
    //if (wData & (1 < < (ncData - i - 1))) 
    //此处判断我记得要写成是大于0,还是大于1来着,记不清楚了,楼主多测试一下吧,否则编译不过去。
    if (wData and (1 shl (ncData - i - 1))) then
    //{ 
    //  m_byDataCodeWord[(nIndex + i) / 8] |= 1 < < (7 - ((nIndex + i) % 8)); 
    m_byDataCodeWord[(nIndex + i) div 8] :=m_byDataCodeWord[(nIndex + i) div 8] or (1 shl (7 - ((nIndex + i) mod 8))); //} 
    -------------------------------------- 
    主要是线条中间的部分。
      

  6.   

    m_byDataCodeWord[(nIndex + i) / 8] |= 1 < < (7 - ((nIndex + i) % 8)); kfcoffe少了个或的处理,
     
    const 
      MAX_DATACODEWORD = 2956;   wData : DWord; 
      nIndex: Integer; 
      m_byDataCodeWord : array[0..MAX_DATACODEWORD] of byte; 
      
      if (wData and (1 shl (ncData - i - 1))) then 
      begin 
        m_byDataCodeWord[(nIndex + i) div 8] := m_byDataCodeWord[(nIndex + i) div 8] or (1 shl (7 - ((nIndex + i) mod 8)));     end; 
      

  7.   

    BYTE byPaddingCode = 0xec; for (i = (m_ncDataCodeWordBit + 7) / 8; i < ncDataCodeWord; ++i)
    {
    m_byDataCodeWord[i] = byPaddingCode; byPaddingCode = (BYTE)(byPaddingCode == 0xec ? 0x11 : 0xec);
    }
    这段呢?