Hi, i am currently working on the project on 8051. The software that i am using is keil uVision3.
i am writing a delay loop for my LED but there is a syntax error in the code. Below is the code:
(1) void delay_time(void) (2) { (3) unsigned int a,b; (4) for(a=0, a<100, a++) (5) for(b=0, b<100, b++); (6) }
and the syntax error is:
line(4): error C141: syntax error near ')' line(5): error C141: syntax error near ')'
Can anyone help me on this? Any help is greatly appreciated!
am writing a delay loop for my LED but there is a syntax error in the code.
Your delay loop does not have any side effects, and therefore it is fair game for the optimizer to remove completely.
Your delay loop does not have any side effects, and therefore it is fair game for the optimizer to remove completely. just one more argument for using assembler.
the worst any '51 programmer can suffer from is assemberofobia.
Erik