HP Forums

Full Version: How to Indent in MoHPC Forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I normally compose my posts on Notepad. My formatting is lost when I post. I noticed the # (insert formatted code) symbol on the above toolbar. Do I wrap my code in # symbols before or after I post?

Regards,

Mark
(06-29-2014 04:04 PM)MNH Wrote: [ -> ]Hello,

I normally compose my posts on Notepad. My formatting is lost when I post. I noticed the # (insert formatted code) symbol on the above toolbar. Do I wrap my code in # symbols before or after I post?

Regards,

Mark

Click on # at the start of your code block, enter your code, then click on # again to close your code block. Alternatively, you can enter your code block, then select all the text in it, then click on # just once.
(06-29-2014 04:04 PM)MNH Wrote: [ -> ]Do I wrap my code in # symbols before or after I post?
No. Use a code-tag instead:

\([\)code\(]\)def gcd(a, b):
    return a if b == 0 else gcd(b, a % b)
[/code]


This results in:
Code:
def gcd(a, b):
    return a if b == 0 else gcd(b, a % b)

Cheers
Thomas
(06-29-2014 05:29 PM)Thomas Klemm Wrote: [ -> ]No. Use a code-tag instead:

The # button is just inserts the code-tags, you can watch as it does this.
Reference URL's