Assuming a comment won't fit (or can't go) on the line it applies to, should one write the comment before the code or after?

Well, wherever future readers will best understand the comment's scope. In other words, wherever most programmers/scripters put such comments.

So where do most programmers/scripters put a comment: before or after its code?

If your answer applies only to specific languages, please indicate which.

And if you can cite an accepted spec or guide that supports your answer, so much the better.


Question: How do you grapple in Dead Rising 3?
Answer: There will be a circle at the bottom off the screen with a red line around it. You have until the line runs out to either perform the gesture or to press the button onscreen.