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
do you consider 'preview' an annoyance?
I don't. Do you think that what I said implied that I do? I just pointed out that the reasoning of Hans-Bernhard Broeker is floored when he insisted that the op did see the formatting when, really, he might not of.
I just pointed out that the reasoning of Hans-Bernhard Broeker is floored
Since we seem to be nitpicking anyway: I think you wanted to say "flawed" there, not "floored".
when he insisted that the op did see the formatting when, really, he might not of.
There is, indeed, a small probability that this might have been how this particular OP fell into this trap. But if you spend a little time to look at other threads in here, you'll see just how small that probability really is. There are just too many posts (including replies by OPs after they've seen the mess they made before and been told about the tags) consisting of nothing else but a single copy-pasted block of code to support the idea that this is anywhere near the typical mechanism this happens.
Not to mention that even if they didn't preview again after the last big paste-in, the garbled version still shows on the OP's screen before it does on anyone else's, since the next thing the forum shows you after posting is the thread you posted into, with that garbled text in it. So that's yet another opportunity to notice your mistake, and at least rectify it by a follow-up with proper formatting --- but that gets ignored, too.
So there really is no valid excuse like the one Trevor Morgan suggested. The OP does get to see the mess he made before anyone else does, so there's no "I didn't see that" defense.
I think you wanted to say "flawed" there, not "floored".
That is correct. Did you also notice the other error of he might not of?
The OP does get to see the mess he made before anyone else does, so there's no "I didn't see that" defense.
That is almost certainly going to be the case. But, since there is no editing feature of a post made, there is little an OP could do about it. Apart from maybe add a corrected repost. There again, as we all know, OPs are frequently just good for nothing lazy slackers, so they are unlikely to repost and say sorry.
But if you spend a little time to look at other threads in here, you'll see just how small that probability really is.
Really? Maybe the frequency of occurence indicates otherwise.
So there really is no valid excuse like the one Trevor Morgan suggested.
Wait a moment there. Trevor Morgan actually wrote:
So, your comments are really only appropriate to what is shown here and not what might be shown on the OPs computer screen.
Is he talking about what the OP might be showing on his editor with the original program fragment or what he sees during the post of this forum? If it is the former, then it does not seem an reasonable statement.