Anyone who doesn't use allman-based style is a flaming cretin. But I guess some people prefer to line up their closing braces not to their respective opening braces, but to something like the fuqin int fun.
>>44
Aww, I already had a post that involved a chest of cocks and a dicksage, but then I clicked the link and realised that you use the correct indention. :(
Name:
Anonymous2009-05-25 13:41
int
is_inset(s)
const char *s;
{
while (*s)
{
if (!(*s>='a' && *s<='z' || *s>='0' && *s<='9'))
{
return 0;
}
++s;
}
return 1;
}
Fixed you're code.
Name:
Anonymous2009-05-25 13:43
>>35 is the indentation style that my highschool C teacher taught to the class, and they always asked me help fix their code whenever the screwed it up. Because of that I have always and will forever associate that style with complete idiots.
Name:
Anonymous2009-05-25 13:48
>>47 WHAT
THE
FUCK
BRO
Code is supposed to look tidy.
Name:
Anonymous2009-05-25 13:56
>>49
I messed up that last brace, but with that fixed it would look beautiful.
Name:
Anonymous2009-05-25 13:58
>>48
The braces on their own lines make simple functions too long but every other style looks weird to me. I'd rather FOIC than C, but sometimes C is best.
Name:
Anonymous2009-05-25 14:12
>>51
For very short functions (like inline ones) I use
int max(int a, int b) {
return (a > b ? a : b); }
Nearly like FIOC.
>>53-55
Clarification required: is the opening brace placed after the end of the line following it, or after the longest line in the block following it?
Name:
Anonymous2009-05-25 14:40
>>52
You know you can skip the braces if you only have one line, right?
Name:
Anonymous2009-05-25 14:43
>>57
I know you can do that when you have if statements etc., but is it possible with functions?
Name:
Anonymous2009-05-25 14:44
>>56
The latter.
int
main
(
int argc,
char **argv
)
{
return 0;
}