#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
uchar code setp_table[]={0xdc,0xcc,0xec,0xe4,0xf4,0xf0,0xf8,0xd8};
uchar i,j,disnum,key;
void delay(uint t)
{
while(t--);
}
void main()
{
while(1);
{
P3=0xff;
if(P3!=0xff)
{
delay(2000);
if(P3!=0xff)
{
key=P3;
switch(key)
{
case 0x7f:disnum=1;
break;
case 0xbf:disnum=2;
break;
case 0xdf:disnum=3;
break;
case 0xef:disnum=4;
break;
case 0xf7:disnum=5;
break;
case 0xfb:disnum=6;
break;
case 0xfd:disnum=7;
break;
case 0xfe:disnum=8;
break;
}
uint i;
for(j=8*64*disnum;j>0;j--)
{
for(i=0;i<8;i++)
{
P0=setp_table[i];
delay(200);
}
}
}
}
}
各位师兄帮我看看错误出在哪里,keil提示:error C141: syntax error near 'unsigned |