1、错 形参之间可以出现空格,但是宏名和形参表之间不能有空格出现
2、
#include<reg52.h>#include<intrins.h>
#define uchar unsigned char
#define uint unsigned int
sbit key1=P3^4
sbit key2=P3^5
void delayms(uint xms)
{
uint i,j
for(i=xmsi>0i--)
for(j=110j>0j--)
}
void mian()
{
P1=0xfe
while(1)
{
if(key1==0)
{
delayms(10)
if(key1==0)
{
while(!key1)
P1=_crol_(P1,1)//松开按键时 左移1位
}
}
if(key2==0)
{
delayms(10)
if(key2==0)
{
while(!key2)
P1=_cror_(P1,1)//松开按键时 右移1位
}
}
}
}