httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Rodent of Unusual Size)
Subject Re: More for the style guide
Date Tue, 15 Jul 1997 18:14:06 GMT
>From the fingers of Alexei Kosut flowed the following:
>On Tue, 15 Jul 1997, Rodent of Unusual Size wrote:
>>     o What about "!" as an operator?  Should it be followed by a space
>>       or not?  (IMHO, since it doesn't modify the value the way "++" and
>>       "--" do, I'm inclined to treat it like other operators and have it
>>       followed by a space.)  This also applies to any other unary
>>       operators, such as negation ("a = -foo" or "a = - foo"?).
>Yuck. One-character operators should, IMHO, be stuck to the following

    Yuck yourself. "x = -foo((int)ptr, !boolfunc(a++, (char *)b))" looks
    attractive to you?  A matter of taste, of course; I would rather
    read "x = - foo((int) ptr, (! boolfunc(a++, (char *) b)))" myself..

>>     o if-then-else blocks are covered, but what about if-then-elseif?
>>       Should the second if-block be in braces?  On the same line as the
>>       else?
>Yes. Yes. Although there is no "then" in C, AFAIK, so maybe you're
>talking about something else.

    Don't be tiresome. <g>  So you like the following:

     if (cond1)
     else {if (!cond2) gritch2;}

    How would you structure that for maximal readability?  I'd rather
    see it as

     if (cond1) {
     else {
	if (!cond2) {


    #ken    :-)}

View raw message