We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
i am facing error C141: syntax error near '}'
my program is given below:
#include<reg51.h> void main ( ) { int x; while (1) { P1 = 0x00 ; for (x=0 ; x<=5000 ; x++) P1 = 0xFF ; for (x=0 ; x<=5000 ; x++) } }
any one can help me how to solve it
Well - my post did contain the text:
"But why can you not use the correct formatting so we get to see a properly intended source code? Didn't you check the information directly above the message input box?"
Then I did give the pertinent information to the problem with the code.
So should we not point out the issue with formatting, when the code in question have an error that do relate specifically to scoping rules - something that indentation rules was created to better highlight?
Forget that for now, I think we've beat that horse into the ground. What I'm trying to understand is the perception of how people post here (not you so much, I'm actually more interested in hearing Erik's reply to this one), whether it's read as laziness regardless or if there's any consideration that a person could simply have made a mistake. It's a very, very specific, direct question. It's not difficult to answer. Answer it if you want or ignore it.
Do you think people who make mistakes deserve any grace or should they immediately be berated for making a mistake when posting here, regardless of circumstances of the mistake?
I'm not talking about in context to THIS situation (we've gone over it over and over). I'm talking about in general. Is the possibility of someone making a mistake even a factor in responses or should anyone who makes a mistake be treated as if they're just being lazy?
Heh, on a sidenote, it's pretty amusing that there are now 53 responses to a one line piece of code that was merely missing a semicolon . . . :)
No - I'm pretty sure the code missed two (2) semicolons.
whether it's read as laziness regardless or if there's any consideration that a person could simply have made a mistake. It's a very, very specific, direct question. It's not difficult to answer. Answer it if you want or ignore it.
I really would not think of it as 'laziness' but more like "lack of interest in doing right". In todays society there is waaaaay too much of "if I do not do what I'm supposed to, so what, it is not politically correct to berate me"
Erik
Fair enough. That makes sense.