Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!mtxinu!jaap From: jaap@mtxinu.COM (Jaap Akkerhuis) Newsgroups: comp.text Subject: Re: ISC 2.0.2 troff broke? (groff as well?) Message-ID: <1991Feb27.221722.2213@mtxinu.COM> Date: 27 Feb 91 22:17:22 GMT References: <1434@vidiot.UUCP> <1435@vidiot.UUCP> Reply-To: jaap@mtxinu.UUCP (Jaap Akkerhuis) Organization: mt Xinu, Berkeley Lines: 52 In article <1435@vidiot.UUCP> brown@vidiot.UUCP (Vidiot) writes: > In article <1434@vidiot.UUCP> brown@vidiot.UUCP (Vidiot) writes: > < > < > < .if \nG==1&\nI==0 \{\ > < .tm inside coverdef G=\nG I=\nI > < > < > < > < .if \nI==0&\nG==1 \{\ > < .tm inside coverdef G=\nG I=\nI > < > < > > As it turns out, groff 1.00 does the same thing. Why is the order of testing > important? > Groff is correctly implementating the left-to-right evaluation rule. Anyway, a lot of people forget about this so they resort to .if \nI==0 .if \nG==1 Common idiom in a macro pacakge is: .if !\nI .if \nG .tm true which is actually a different test (in C: if( I != 0 && G == 0) ) jaap PS. I assume that you know that you have to double the backslahes inside a macro. I guess you didn't want to shoe all these trivial details.