• This topic has 4 replies, 4 voices, and was last updated 9 years ago by JoeG.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Possibly a stupid markup question – how do I put code into the forum posts?
  • oldnpastit
    Full Member

    How do I put fixed-point code with proper indentation in to forum posts?

    Just using “code” doesn’t do the indentation:


    if (foo)
    bar(42);

    And is there any way to get language-specific syntax highlighting?

    scotroutes
    Full Member

    That’s all included in the new version of the forum

    chambord
    Free Member

    If you wrap the code in backticks instead of < code> blocks it indents fine.

    Syntax highlighting though… 😆

    #include <stdio.h>
    
    int main() {
      int i;
      for (i = 0; i < 10; i++) {
        printf("Hello oldnpastit\n");
      }
      return 0;
    }
    qwerty
    Free Member

    You need one of these:

    … what is code???

    JoeG
    Free Member

    Works fine for me 😉

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Possibly a stupid markup question – how do I put code into the forum posts?’ is closed to new replies.