a good way to post sourcecode?

  • Author
    Posts
  • #5690

    monosource
    Member

    I’m thinking about starting a kind of source-blog, where i post some interesting code, short programs, that kind of thing.

    the problem is, i don’t want all that code to show up in the main view, so i need someway of hiding it. Either a ‘more..’ tag that expands text into the main view (i belive lj has this kinda option) or the ability to upload text files and link to them. I guess if worse comes to worse, i’ll just host it somewhere else and link to it : (, but that doesn’t seem elegant.

    any ideas?

    #5793

    monosource
    Member

    looks like there is a way to format posts in here, using backticks:

    int main(int argv,char **argv) {
    printf("do backticks work?");
    }

    but i haven’t found a way to do that from the blog posts, and that still doesn’t solve the problem of me hiding parts of it from main view initially.

    #6186

    errorflag
    Member


    #include <stdio.h>

    int main(int argc, char *argv[])
    {
    printf("Hello, world\n");

    return 0;
    }

    #6187

    errorflag
    Member


    #include<stdio.h>
    int main(int argc, char *argv[])
    {
    printf("Hello, world\n");
    return 0;
    }

The topic ‘a good way to post sourcecode?’ is closed to new replies.