if (e1) return e2; [else] s1;
Jim Miller
jamiller at hpcupt1.HP.COM
Tue Mar 27 05:45:45 AEST 1990
>> Ok, style mavens, which is "better":
>>
>> if (e1) return e2; if (e1) return e2;
>> else s1; s1;
I'd vote for the second one.
>
>or 'Allman' (the names came from an 'emacs' manual, BTW):
>
> if (e1)
> {
> s1;
> }
I like that one, because I prefer the following:
if (e1) {
s1;
}
(IMHO) I don't think I "lose" anything by putting the { with the if, but I
think I do if the } is not on a separtate line.
jim miller
More information about the Comp.lang.c
mailing list