Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!apple!netcomsv!aed From: aed@netcom.COM (Andrew Davidson) Newsgroups: comp.lang.c Subject: if this legal code? Message-ID: <1991Jun25.235904.23103@netcom.COM> Date: 25 Jun 91 23:59:04 GMT Organization: Netcom - Online Communication Services UNIX System {408 241-9760 guest} Lines: 30 Hi here is a piece of code I am responceible for maintaining. It compiles and runs correctly on the sun and dos using the msc 5.1 compiler if (! ((tt = testEntry.code - testCode) || (tt = testEntry.leg - testLeg))) { .... } does the language guarentee that if testEntry.code -testCode is not equal to 0, that the second assignment (tt = testEntry.leg - testLeg) will not be executed? will the -O compiler option flag effect this?? thanks Andy P.S personaly I would rewite this, but the orginal author will not allow my. -- ----------------------------------------------------------------- "bede-bede-bede Thats all Folks" Porky Pig Andrew E. Davidson andy@cats.com aed@netcom.COM -----------------------------------------------------------------