BYTE,WORD,DWORD

最近在看LPC1766的KEIL例程,里面变量类型都是BYTE与WORD,DWORD,并不是常见的char,int等,查type.h,看到它们的定义如下:

 

typedef unsigned char  BYTE;

typedef unsigned short WORD;

typedef unsigned long  DWORD;

typedef unsigned int   BOOL;

 

也就是说BYTE是无符号的char型,长度为1字节,WORD是无符号short型,长度为2字节,DWORD是无符号long型,BOOL是无符号int型,长度都为4字节。

 

你可能感兴趣的:(byte)