"code" window needed

  10 years ago

There is need for a code window to present unformatted
text for programming examples etc.

If you want to write for instance an include statement:
#include <stdio.h>

it will print out like:

The rest is dropped. If you figure out how to include those characters then that could eventually lead to a worse problem... the beginner who wants to try out your code will most likely try to copy and paste your example in a text- editor and compile it directly. There are a whole bunch of different browsers and editors out there and our beloved beginner could end up pasting a code example with rests of the formatting. (been there, done that... :( )
(although it works for me here with firefox/gedit)

How to run C program in linux?
Latest comments
oscar799 10 years ago

Marked "Considered"

kazztan0325 10 years ago

Yes, I agree with you.

dagon 10 years ago

Maybe. But I would really prefer to just write plain text like in a text editor. That way I could throw in a line of super-hot c-code and not worry about it.

kazztan0325 10 years ago

Maybe we would need to add HTML tag for showing program source code like below:

source code

dagon 10 years ago

Here is one bug of concern:

trollboy 10 years ago

Apparently not. (that was <pre> by the way)

trollboy 10 years ago

It's an annoyance all right. Although it may be a problem with the editor rather than the site. Maybe using

will do something?