Date: Sun, 31 Jan 1999 21:48:36 -0800 From: Don Lewis <Don.Lewis@tsc.tdk.com> To: Sheldon Hearn <axl@iafrica.com>, Greg Lehey <grog@lemis.com> Cc: current@FreeBSD.ORG Subject: Re: btokup().. patch to STYLE(9) (fwd) Message-ID: <199902010548.VAA07713@salsa.gv.tsc.tdk.com> In-Reply-To: Sheldon Hearn <axl@iafrica.com> "Re: btokup().. patch to STYLE(9) (fwd)" (Jan 29, 12:05pm)
next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 29, 12:05pm, Sheldon Hearn wrote:
} Subject: Re: btokup().. patch to STYLE(9) (fwd)
} The reason I'm interested in this (now tiresome) thread is that I'd much
} rather have to read
} 
} 	/*
} 	 * Bail out if the time left to next transaction is less than
} 	 * the duration of the previous transaction.
} 	 */
} 	if (t % u - n % u < d % u) {
} 
} than
} 
} 	if (((t % u) - (n % u)) < (d % u)) {
} 
} Giving folks the go-ahead to use parens as a form of documentation is
} misguided and will end in tears. MHO.
This is a fairly trivial example, but I find the second version slightly
easier to read at a glance.  I do think it's overly parenthesized, though.
I prefer
 	if ((t % u - n % u) < (d % u)) {
or 
 	if ((t % u - n % u) < d % u) {
because they are less cluttered.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902010548.VAA07713>
