#include<reg52.h>
#include<intrins.h>
#define uchar unsigned char
#define uint unsigned int
uchar temp;
void delay(uint z)
void main()
{
temp=0xfe;
P1=temp;
while(1)
{
delay(1000);
temp=_crol_(temp,1);
P1=temp;
}
}
void delay(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=110;y>0;y--);
}
下面是出现的错误
15.C(1): warning C500: LICENSE ERROR (R208: RENEW LICENSE ID CODE (LIC))
15.C(8): error C132: 'main': not in formal parameter list
15.C(8): error C141: syntax error near '{'
15.C(9): error C136: 'temp': 'void' on variable
15.C(9): error C244: 'temp': can't initialize, bad type or class
15.C(9): error C136: 'temp': 'void' on variable
15.C(9): error C132: 'temp': not in formal parameter list
15.C(10): error C244: 'P1': can't initialize, bad type or class
15.C(10): error C132: 'P1': not in formal parameter list
15.C(11): error C141: syntax error near 'while'
15.C(11): error C141: syntax error near '1'
15.C(13): error C141: syntax error near '1000'
15.C(14): error C231: 'temp': redefinition
15.C(14): error C247: non-address/-constant initializer
15.C(15): error C231: 'P1': redefinition
15.C(15): error C247: non-address/-constant initializer
15.C(15): error C231: 'P1': redefinition
15.C(16): error C141: syntax error near '}'
15.C(19): error C231: 'delay': redefinition
15.C(23): error C231: 'delay': redefinition