Newbie forum use question


#1

Please excuse my question for being so basic, but I haven’t found the answer.
How do you upload code snippets so that you get the highlighted results of character searches, perhaps the error message as it appears in the editor, etc?
I can just copy and paste the code, but it wouldn’t be nearly as clear and useful as the format I see on the forum.
thanks in advance,
John


#2

I am not quite sure I understand the question fully but when you are posting code you can place it between the code-markup tags and it will appear like this:

int foo ()
{
     // ...
}

As opposed to pasting like this:
int foo ()
{
// …
}

To do this: Paste your code in the message-composer box, select, and click the Code button.


#3

Unfortunately, inline errors and highlights don’t copy with code. You’d need to use a screenshot for us to see those.

As to syntax highlighting, you could paste the code to a site such as pastie.org or pastebin.org, but I think we can get along fine without it. I’d still prefer to have the code pasted directly here, for posterity, using the technique ibex mentioned (the Code tag in the message-post form).