#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));
}
--------------------------------------
主要是线条中间的部分。
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));
}
--------------------------------------
主要是线条中间的部分。
{
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;
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;
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; ..................
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))); //}
--------------------------------------
主要是线条中间的部分。
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;
{
m_byDataCodeWord[i] = byPaddingCode; byPaddingCode = (BYTE)(byPaddingCode == 0xec ? 0x11 : 0xec);
}
这段呢?