void main ( void ); { /************************************ * * * Define a variable i * * * ************************************/ unsigned int i; /************************************ * * * Start of loop * * * ************************************/ for ( i = 10 ; i > = 0 ; i = i - 1 ) { /************************************ * * * Add one to i * * * ************************************/ i=i+1; } what is wrong ??????????
www.catb.org/.../smart-questions.html
thanks for replying my question. the results were interesting. some of you even found the right answer.
Are you the twin brother (or a clone) of "Teper LAK"?
See here:
http://www.keil.com/forum/20966
But the open issue here is what is "the right answer".
An even more interesting question here is why you think a web forum should be a syntax checker? A compiler is great at handling such problems - and someone who do want answers about syntax errors would normally post the relevant part of the source code, and the relevant messages from the compiler.
And it is a known fact that lots of people do not copy their code, but retype it, when posting here. So their questions are not related to the new syntax errors they introduce in the posting process. And in this case, the code had more than one syntax error.
But few developers would consider syntax errors as "bug" - which is the thread title. A bug is when a program don't do what we expected.
And the interesting loop did contain a construct that may - or may not - be seen as a bug. Or at least indicate that the program don't end up doing very much. The intention of that loop obviously very much controls the need for another loop to stop the program from exiting.
very interesting. all useful information for my research.
well jameel, the only information glaring from this thread is that you do not know what you are doing (you really don't, dude) and are too proud to admit it...be less of a macho, it will allow you to learn something !
you do not know what you are doing
I think it is more likely that you guys gave him the answers to his home work assignment, he is performing an experiment to see what kind of responses he would get or he is just messing with you.