Return to BSD News archive
Newsgroups: comp.os.386bsd.bugs Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!centre.univ-orleans.fr!univ-lyon1.fr!swidir.switch.ch!newsfeed.ACO.net!Austria.EU.net!EU.net!uunet!brunix!mhw From: mhw@cs.brown.edu (Mark Weaver) Subject: Re: FreeBSD 1.1.5 -- Bug in /usr/bin/leave Message-ID: <1994Aug19.053027.23352@cs.brown.edu> Summary: You're a stubborn fool Sender: news@cs.brown.edu Organization: Brown University Department of Computer Science References: <NILS.94Aug14230659@guru.stgt.sub.org> <NILS.94Aug16025340@guru.stgt.sub.org> <1994Aug17.172837.4215@cs.brown.edu> <NILS.94Aug18045517@guru.stgt.sub.org> Date: Fri, 19 Aug 1994 05:30:27 GMT Lines: 62 In article <NILS.94Aug18045517@guru.stgt.sub.org>, Cornelis van der Laan <nils@ims.uni-stuttgart.de> wrote: >Sure, > a || b || c && d >is equivalent to > (a || b || c) && d >nobody doubts that. >But parenthesis do matter in the expression > a || b || (c && d) > >Have you tested the program? Alright dude, your stubborn ignorance is starting to grate on my nerves. mhw ~ % cat t.c #include <stdio.h> main() { int a, b, c, d; printf("column 1: a || b || c && d\n"); printf("column 2: (a || b || c) && d\n"); printf("column 3: a || b || (c && d)\n"); for (a = 0; a < 2; a++) for (b = 0; b < 2; b++) for (c = 0; c < 2; c++) for (d = 0; d < 2; d++) { printf("%d ", (a || b || c && d)); printf("%d ", ((a || b || c) && d)); printf("%d\n", (a || b || (c && d))); } } mhw ~ % cc -o t t.c mhw ~ % ./t column 1: a || b || c && d column 2: (a || b || c) && d column 3: a || b || (c && d) 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 mhw ~ % 'nuff said. Next time, read the f**king manual. Mark -------------------------------------------------------------------- Email: Mark_Weaver@brown.edu | Brown University PGP Key: finger mhw@cs.brown.edu | Dept of Computer Science