Coding styles thread (19)

6 Name: #!usr/bin/anon 2005-11-09 21:05 ID:8XxS3pgB

I like my curly brackets to match up for ease of reading:

int main(int argc, char *argv[])
{
if (argc < 2)
{
printf("What the hell is going on here?\n");
exit(1);
}
printf("Your name is: %d\n", atoi(argv[1]));
return 0;
}

Function calls/definitions don't have spaces before the parentheses, but things that look like functions but aren't (if while for switch sizeof) do. Indentation uses tabs, which can be assumed to be anywhere from 2 to 8 characters, though I usually set them to 8 when editing. Lines should always be shorter than 80 characters.

This thread has been closed. You cannot post in this thread any longer.