#include <reg52.h>
main()
{ unsigned char data x=0xfe;
unsigned int i,j;
while(1)
{ p2=x;
for(i=0;i<10;i++)
for(j=0;j<1000;j++);
x=x<<1;
if(x==0) x=0xfe;
}
p2要用大写P2 ,最后少了大括号。问题在你的格式不规范,没有缩进,括号没成对出现不好看出。
#include <reg52.h>
main()
{
unsigned char data x=0xfe;
unsigned int i,j;
while(1)
{
P2=x;
for(i=0;i<10;i++)
for(j=0;j<1000;j++);
x=x<<1;
if(x==0) x=0xfe;
}
}追问
#include <reg52.h>
main()
{
unsigned char data x=0xfe;
unsigned int i,j;
while(1)
{
P2=x;
for(i=0;i<10;i++)
for(j=0;j<1000;j++);
x=x<<1;
if(x==0) x=0xfe;
}
}追问
哦!!!这个对的 那另外那个喃? 说的是error near ” 这又是什么错喃?
温馨提示:答案为网友推荐,仅供参考