#include<reg51.h>
typedef unsigned int u16;
void main()
{
P0=0x01;
u16 i;
}
Placing a statement declaring a new variable following a statement
assigning an 8-bit IO port makes the compliler report the
error
syntax error near 'u16', expected '__asm'
'i': undefined identifier
If exchange 'P0=0x01;' and 'u16 i;', the compiler won't report a
error, why ? Is this a bug of the compiler?
↧