I asked a question and provided corresponding code inside my question using the tools Stack Overflow provides. Now, someone answered, but I feel like I need to provide additional code specific to his answer.
What is the prefered way to do so?
Does the code styling also work in comments on answers? Or should I provide links to pastebins / gists? Or should I edit my question (risking that my question gets longer and longer)?
Edit: If talking about "additional code", I'm thinking of these use cases:
If I ask a question, I try to post only code, that is relevant to the question. Most often this will be a stripped down version of my original code, because the original code includes way to much irrelevant stuff. However, my attempt to judge what is relevant may be wrong. The problem might be in parts of the code that I didn't post in the original question. So I feel I need to post addtional code!?
As @Sinatr suggested: To show my attempt with answer, which still doesn't work, so that answerer may continue helping me. As I attempt using answers in my code, I change the code, so the questions doesn't contains the latest version anymore. Should I update it? Or leave it as it is? If I leave it as it is, and I get an answers solving the problem with the old code from the question, i'm risking that this solution is not useful for me, because it doesn't fit in my latest version of my code any more...
code in backticks
. If the answer has missed a critical issue your question is about, edit your question to add that and ping the author about what they missed.