Quantcast
Channel: Keil Discussion Forum RSS Feed
Viewing all articles
Browse latest Browse all 3049

C51: Why the compiler thinks I want to write assembly codes (1 Replies)

$
0
0
#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?

Viewing all articles
Browse latest Browse all 3049

Trending Articles