Showing posts with label code formatting. Show all posts
Showing posts with label code formatting. Show all posts

Tuesday, 28 October 2008

Formatting of code fragments on blogs

I have just left a comment on Darrel's blog regarding formating of code fragments within a blog. Unfortuantly, the blog commenting facility doesn't allow use of the HTML pre tag, and hence the point I was trying to make was somewhat lost! For clarity, I repeat it here.

Use of the HTML pre tag leaves white space intact, allows direct use of > and <, and uses a courier font. E.g.:
setup(){
int x = 0;
if (x > 0){
doSomething();
}
}