前面多谢各位的指导! #include <AT89X51.H> unsigned char code table []={0xfe,0xfd,0xfb,0xf7, 0xef,0xdf,0xbf,0x7f, 0xfe,0xfd,0xfb,0xf7, 0xef,0xdf,0xbf,0x7f, 0x7f,0xbf,0xdf,0xef, 0xf7,0xfb,0xfd,0xfe, 0x7f,0xbf,0xdf,0xef, 0xf7,0xfb,0xdf,0xfe, 0x00,0xff,0x00,0xff, 0x01}; unsigned char i;
void delay(void) { unsigned char m,n,s; for(m=20;m>0;m--) for(n=20;n>0;n--) for(s=248;s>0;s--); }
void main(void) { while(1) { if(code table!=0x01) { P1=table; i++; delay(); } else i=0; } } 帮忙看看这程序错在哪里啊? 题目的要求是利用制表的方法,使端口P1的灯,左移2次,右移2次,闪烁2次(延时的时间为0.2秒) 运行后出现这几行字 Build target 'Target 1' assembling STARTUP.A51... compiling my-test.c... compiling my-test1si.c... ..\MY-TEST1\MY-TEST1SI\MY-TEST1SI.C(27): error C141: syntax error near 'code' Target not created |