What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

Possible Duplicate:
How about newlines within comments ?

Shouldn't comments on StackOverflow be multi-line too?

Just like with posts. Sometimes it's difficult to discuss and present example code in comments to other people's posted answers

share|improve this question

marked as duplicate by Arjan, ChrisF, waiwai933, fretje, YOU Apr 22 '11 at 0:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Closed as duplicate, but where is the link to duplicate? –  studgeek May 11 '11 at 16:53

2 Answers 2

up vote 6 down vote accepted

If you're needing to respond to an answer with code, something has already gone wrong. If you're another answerer, edit and expand your original answer to include any code needed to fully explain your position. If you're the asker, edit your question. For anyone else, we actively discourage these discussions within a larger question. We want you to start or encourage the other user to start a new, focused, question and keep the original question on-topic.

share|improve this answer
    
well, if someone answers partially incorrectly and you want to point that out to him, so he can edit it or something, sometimes you need to post a code example that works, explaining why his doesn't the way he intended it to, for instance. –  Nico Nov 8 '10 at 17:41
5  
No, either just edit the answer to correct the code or post your own answer with correct code. –  Joel Coehoorn Nov 8 '10 at 17:47

I think it should. Code snippets can be very useful for discussing an answer.

For example:

Hey, how about swapping the arguments like this?
function(rhs, lhs) { small snippet of code }

share|improve this answer
5  
You can still do code formatting inside comments, so very small things fit in there just fine. "Try function(rhs, lhs) { // do work here }" would be a fine comment. Just use backticks around whatever you want to format like code. –  Daniel DiPaolo Apr 21 '11 at 20:04
    
but that ain't pretty –  Nico Apr 21 '11 at 21:52
    
As @Nico says, and the question explicitly says newlines in comments (vs. just code in comments). Nico, upvote? Hoping to show folks have interest in having this work (vs the alternate opinion that its a bad idea). –  studgeek May 11 '11 at 16:52

Not the answer you're looking for? Browse other questions tagged .