#include <reg51.h>
#include <stdio.h>
sbit LED=P1^0;
void delay( unsigned int );
void main( void )
{
while(1){ //???
LED = 0; //P1.0??LED??
delay( 500 ); //??????
LED = 1; //P1.0??LED??
delay( 500 ); //??????
}
}
void delay( unsigned int n ) //??????
{
unsigned int x, y;
for( x = 0; x < n; x ++ ){
for( y = 0; y < 121; y ++ ){
;
}
}
}
倒数第7行 ,unsignedint x, y; 少空格, 正确为 unsigned int x, y; |