&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif&nbsp(s&amp#91i]&nbsp>&nbsp" ")&nbsp{&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspdoSomething&nbsp("useful");&#91/pre]And here is some more text following the code.----------------------------------------------------------------------------------

The above source text will then be formatted as:

----------------------------------------------------------------------------------Following is some example code to show code formatting capabilities:[pre]package example;

public class ExampleClass {

public someMethod (String s) {

if (s&#91i] > " ") { doSomething ("useful");[/pre]And here is some more text following the code.----------------------------------------------------------------------------------

As you see we can still use the other formatting codes like &#91b]&#91/b] etc. But I noticed that we need at least one space in empty lines because elsewhere they would disappear inside a pre-block.

You might wonder how I managed to show you the source text above with disabled formatting. The trick is to use another undocumented feature: We can use the HTML replacement characters starting with "&amp" in our messages. Especially useful is &ampnbsp for non breaking spaces to keep the indentation. In the above examples I used &amp#91 for "[" and &ampamp for "&" to prevent any formatting. See http://msdn.microsoft.com/workshop/author/dhtml/reference/charsets/charsets.asp for a complete list of replacement codes.

I have noticed that the above message does not look good on Netscape as it requires a closing ";" after the "&amp;" replacement codes. So I repost my above post with semicolons to make it look good also with Netscape and hopefully other browser. I am really missing a possibility to edit old messages :-)

With some more research I found interesting undocumented formatting features for the forum.

I have always missed a possibility to show code with indentation and in fixpoint font. Here is the solution: Just enclose your code with &#91;pre] and &#91;/pre]. Here is an example:

----------------------------------------------------------------------------------Following is some example code to show code formatting capabilities:&#91;pre]package example;

public class &#91;b]ExampleClass&#91;/b] {

public &#91;b]someMethod&#91;/b] (String s) {

if (s&amp;#91;i] > " ") { doSomething ("useful");&#91;/pre]And here is some more text following the code.----------------------------------------------------------------------------------

The above source text will then be formatted as:

----------------------------------------------------------------------------------Following is some example code to show code formatting capabilities:[pre]package example;

public class ExampleClass {

public someMethod (String s) {

if (s&#91;i] > " ") { doSomething ("useful");[/pre]And here is some more text following the code.----------------------------------------------------------------------------------

As you see we can still use the other formatting codes like &#91;b]&#91;/b] etc. But I noticed that we need at least one space in empty lines because elsewhere they would disappear inside a pre-block.

You might wonder how I managed to show you the source text above with disabled formatting. The trick is to use another undocumented feature: We can use the HTML replacement characters starting with "&amp;" in our messages. Especially useful is &amp;nbsp; for non breaking spaces to keep the indentation. In the above examples I used &amp;#91; for "[" and &amp;amp; for "&" to prevent any formatting. See http://msdn.microsoft.com/workshop/author/dhtml/reference/charsets/charsets.asp for a complete list of replacement codes.