程序报错error C141: syntax error near 'interrupt‘
时间:10-02
整理:3721RD
点击:
void timer0(void) interrupt 1 using 1
{
TR0=0;
CLK1=!CLK1;
CLK2=!CLK2;
for(m=0;m<30;m++)
{
;
}
CLK1=!CLK1;
CLK2=!CLK2;
TH0=(65536-1000)/256;
TL0=(65536-1000)%256;
TR0=1;
}
if((6<time_buf[4])&&(time_buf[4]<12))
{
经编译出现下面情况:
附加.C(359): error C141: syntax error near 'interrupt'
附加.C(362): error C136: 'TR0': 'void' on variable
附加.C(374): error C186: invalid dereference
附加.C(376): error C141: syntax error near 'if'
附加.C(376): error C141: syntax error near '6'
附加.C(376): error C129: missing ';' before ')'
Target not created
{
TR0=0;
CLK1=!CLK1;
CLK2=!CLK2;
for(m=0;m<30;m++)
{
;
}
CLK1=!CLK1;
CLK2=!CLK2;
TH0=(65536-1000)/256;
TL0=(65536-1000)%256;
TR0=1;
}
if((6<time_buf[4])&&(time_buf[4]<12))
{
经编译出现下面情况:
附加.C(359): error C141: syntax error near 'interrupt'
附加.C(362): error C136: 'TR0': 'void' on variable
附加.C(374): error C186: invalid dereference
附加.C(376): error C141: syntax error near 'if'
附加.C(376): error C141: syntax error near '6'
附加.C(376): error C129: missing ';' before ')'
Target not created
大括号没成对啊,if前面的大括号多余了