[an error occurred while processing this directive]
|
#define byte unsigned char
#define word unsigned int
#define longint unsigned long
typedef struct {
byte b[3]; // b[0]-Lo byte b[2]-Hi byte
} ShortType;
typedef union {
ShortType s;
longint l;
} lsType;
#define SizeOfTable ...
ShortType table[SizeOfTable];
longint GetCurentLongValue()
{
return 0x04030201; // ...for example
}
void maine()
{
word it;
lsType tmp;
longint fullSizeLongValue;
ShortType *pShortValue;
//...
for(it=0;it
pShortValue=(ShortType *)&table[it];
*pShortValue=tmp.s; // to Table
//....
tmp.s=*pShortValue; // from Table
fullSizeLongValue=tmp.l; // !!!!!
//...
}
//....
}
Ответы
Перейти к списку ответов
|||
Конференция
|||
Архив
|||
Главная страница
|||
Содержание