Date: Sat, 30 Jan 1999 00:59:52 -0700 From: Warner Losh <imp@village.org> To: Zach Heilig <zach@uffdaonline.net> Cc: Julian Elischer <julian@whistle.com>, current@FreeBSD.ORG Subject: Re: btokup().. patch to STYLE(9) (fwd) Message-ID: <199901300759.AAA74734@harmony.village.org> In-Reply-To: Your message of "Fri, 29 Jan 1999 20:45:21 CST." <19990129204521.A73046@znh.org> References: <19990129204521.A73046@znh.org> <Pine.BSF.4.05.9901290941240.304-100000@s204m82.isp.whistle.com> <199901291802.LAA67403@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <19990129204521.A73046@znh.org> Zach Heilig writes: : On Fri, Jan 29, 1999 at 11:02:48AM -0700, Warner Losh wrote: : > Yes. I agree with that. : > if (a | b & c % d ^ e) : > should have been written as: : > if (((a | (b & (c % d))) ^ e) != 0) : : I don't know why I'm getting into this, but to prove the point that this : expression takes careful thought, it is: : (a | ((b & (c % d)) ^ e)) : (^ is higher precedence than | , according to /usr/share/misc/operator). You see my point exactly. The explicit parens are what is intended in this example. How easy it is to get it wrong and how hard it is to prove to be right when things get that mixed up and crazy :-) Warner 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?199901300759.AAA74734>