Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Semicolon

Name: Anonymous 2011-12-21 15:17

Inspired by whitespace. Instead of whitespace, everything is ;

Name: Anonymous 2011-12-21 15:52

Imagine coding C without these icky old braces (K&R brace style):

    void push(int x)
    {
        if (stack_idx >= STACK_SIZE-1) {
            printf("Stack overflow!\n", STACK_SIZE);
            exit(1);
        }
        stack[++stack_idx] = x;
    }


… instead write beautiful, braceless code like this:

    void push(int x):
        if (stack_idx >= STACK_SIZE-1):
            printf("Stack overflow!\n", STACK_SIZE)
            exit(1)
        stack[++stack_idx] = x

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List