posting code, a warning (Greg B.)

I’ve just noticed there is a problem with code that has been dropped into posts. If you copy and paste directly from the post, for some reason, depending on the syntax of the code you may lose important bits. For example “while ()” appears as “while ()” but thats not what it is! Click on edit and see for yourself! You will not have this problem if you go to the edit post page and copy from there. Also and this may just be the text editor I use but some commented line were broken into multiple lines which did not have ‘#’.

There has to be a better way to host code here but I don’t know what it is. Any ideas?

2 thoughts on “posting code, a warning (Greg B.)

    • You are wise in the ways of the internet. That is one option. there is really no problem with that other then the file extensions need to be changed each time. Maybe the security on the blog can be changed to take “.pl” and “.R” files etc.

      I think I will edit all my posts though and make the code an attached .txt file in the mean time.

Comments are closed.