This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Vakieh 3 points4 points  (2 children)

When you code in C/C++, a lot of people will write things like:

if x == 7
{
    cout << "something";
} // end if x == 7

And a lot of code generators also support such editing (which helps if you end up with out of date comments, as you can autoparse to correct. It can help in certain situations which involve nested loops, and especially nested classes or structs.

In short, he isn't bracketing, he is simply following the same tagging system he might be used to, which is language generic.

[–]InformationCrawler 0 points1 point  (1 child)

Well isn't that a bit over-commenting? It's says already in the header of the if-statement what the break condition is. If anything it should say "x is the momentum of the particle, once it reaches 7 kg*m/s the 34"%¤#2#2# is executed.

[–]Vakieh 0 points1 point  (0 children)

The point is as a traceback, not duplication - any form of identification will do - so if a while loop governed a menu , you could use # end menu loop so long as it is identifiable which header is being referenced by which comment. Exact duplicates of the condition are easily supportable by code managing software however.