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

Code Style

Name: Anonymous 2010-01-24 16:09

The following program demonstrates your tab width, indentation style, and various other aspects of your code style. Please write it (in verbatim) in your preferred style. Remember to use spaces instead of tabs, as shitchan automatically converts tabs into 3 space characters.

[code]#include "stdio.h"

int main (void)
{   int   x;
    char  c = 'a';
    float y = 0;
   
    for (x = 0; x < 10; x++)
    {   if  (x % 2 == 0)
            printf ("%d\n", x);
        else
        {   printf ("%c\n", c);
            c +=1;
        }
    }
   
    return 0;
}

Name: Anonymous 2010-01-26 2:31

>>61
related declarations should have equal signs aligned
int something      = 4;
int something_else = 7;
Fair enough.  Although I think Guido might object.
repeated related function calls should have arguments aligned (with space only after the commas, none trailing; no alignment of commas or closing brace)
some_func(an_arg,      another_arg);
some_func(a_third_arg, last_arg);
Uggggh.  IHBT.

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