標(biāo)題:
初學(xué)者的問(wèn)題FLASHLED.C(10): error C141: syntax error near 'z', expected ')'
[打印本頁(yè)]
作者:
tnt2007
時(shí)間:
2017-6-2 10:11
標(biāo)題:
初學(xué)者的問(wèn)題FLASHLED.C(10): error C141: syntax error near 'z', expected ')'
源程序:
#include <reg52.h>
#include <intrins.h>
#define uchar unsigned char
#define uint unsigned int
uchar i;
uchar temp;
void delay (unit z)
{
uint x,y;
for(x = z; x > 0; x--)
for(y = 120; y > 0 ; y--);
}
void main()
{
temp = 0x7f;
P1 = temp;
while(1)
{
for(i = 0; i < 8; i++)
{
temp = _cror_(temp,1);
P1 = temp;
delay(1000);
}
}
}
錯(cuò)誤提示:
Build target 'Target 1'
compiling flashled.c...
FLASHLED.C(10): error C141: syntax error near 'z', expected ')'
FLASHLED.C(12): error C141: syntax error near 'x'
FLASHLED.C(12): error C202: 'x': undefined identifier
FLASHLED.C(13): error C202: 'x': undefined identifier
FLASHLED.C(14): error C202: 'y': undefined identifier
作者:
tnt2007
時(shí)間:
2017-6-2 10:25
知道錯(cuò)哪里了,把帖子刪了吧!
歡迎光臨 (http://www.torrancerestoration.com/bbs/)
Powered by Discuz! X3.1