#define uint unsigned int
#define uchar unsigned char
sbit dula=P2^6;
sbit wela=P2^7;
uint a=0;
uchar code table[]={
0x3f,0x06,0x5b,0x4f,
0x66,0x6d,0x7d,0x07,
0x7f,0x6f,0x77,0x7c,
0x39,0x5e,0x79,0x71};
uchar code tablewe[]={
0xfe,0xfd,0xfb,0xf7,0xef,0xdf};
void display(uint z)
void main()
{
while(1)
{
for(;a!=0;a++)
{wela=1;
P1=tablewe[a];
wela=0;
delay(1);
dula=1;
P1=table[7-a];
dula=0;
delay(1);
if(a==6)
{a=0;}
}
}
}
void delay(uint z)
{uint x=1000,y;
for(;x>0;x--)
for(y=z;y>0;y--);
}
654321.C(16): error C132: 'main': not in formal parameter list
654321.C(16): error C141: syntax error near '{'
654321.C(19): error C132: 'a': not in formal parameter list
654321.C(19): error C136: 'a': 'void' on variable
654321.C(19): error C132: 'a': not in formal parameter list
654321.C(20): error C136: 'wela': 'void' on variable
654321.C(20): error C244: 'wela': can't initialize, bad type or class
654321.C(20): error C136: 'wela': 'void' on variable
654321.C(20): error C132: 'wela': not in formal parameter list
654321.C(21): error C244: 'P1': can't initialize, bad type or class
654321.C(21): error C132: 'P1': not in formal parameter list
654321.C(22): error C244: 'wela': can't initialize, bad type or class
654321.C(22): error C132: 'wela': not in formal parameter list
654321.C(23): error C141: syntax error near '1'
654321.C(23): error C132: 'delay': not in formal parameter list
654321.C(24): error C244: 'dula': can't initialize, bad type or class
654321.C(24): error C132: 'dula': not in formal parameter list
654321.C(25): error C244: 'P1': can't initialize, bad type or class
654321.C(25): error C132: 'P1': not in formal parameter list
654321.C(26): error C244: 'dula': can't initialize, bad type or class
654321.C(26): error C132: 'dula': not in formal parameter list
654321.C(27): error C141: syntax error near '1'
654321.C(27): error C132: 'delay': not in formal parameter list
654321.C(28): error C141: syntax error near 'if'
654321.C(28): error C141: syntax error near '==', expected ')'
654321.C(29): error C279: 'a': multiple initialization
654321.C(29): error C231: 'a': redefinition
654321.C(29): error C141: syntax error near '}'
Target not created请问哪错了啊