Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!rochester!kodak!ispd-newsserver!ism.isc.com!jeff From: jeff@itx.isc.com (Jeff Copeland) Newsgroups: comp.text Subject: Re: ISC 2.0.2 troff broke? Message-ID: <1991Feb27.161113.22188@ism.isc.com> Date: 27 Feb 91 16:11:13 GMT References: <1434@vidiot.UUCP> Sender: usenet@ism.isc.com (Ism Usenet News) Followup-To: comp.text Organization: Interactive Systems Corp., Austin, TX Lines: 22 In article <1434@vidiot.UUCP> brown@vidiot.UUCP (Vidiot) writes: > >I am running ISC 2.0.2 Unix and ISC text processing package. When I have >the following line, with neither of the registers set on the command line: > > .if \nG==1&\nI==0 \{\ > .tm inside coverdef G=\nG I=\nI > >It gets past the if statement and shows that both registers are indeed zero. >.... >What the Hell is going on here? Is the ISC version of DWB 2.0 broke? The secret is evaluation order: if you add parentheses: .if (\nI==0)&(\nG==1) \{\ it works as you expect. So the line in the DWB 2.0 docs that says: "Except where controlled by parentheses, evaluation of expressions is left-to-right." is *really* true. By the way, Interactive's DWB 2.0, IBM's DWB 2.0 on the RS/6000, DWB 1.0 on a VAX running BSD, and old troff as ported by BRL to BSD, all act the same on this fragment.