Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!pacbell.com!ucsd!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!oswego!news From: hunter@Oswego.EDU (Eric Hunter) Newsgroups: comp.lang.c Subject: Re: A define problem Keywords: define Message-ID: <1991Jan8.012923.3390@oswego.Oswego.EDU> Date: 8 Jan 91 01:29:23 GMT References: <440@bally.Bally.COM> Reply-To: hunter@oswego.Oswego.EDU (Eric Hunter) Distribution: usa Organization: Instructional Computing Center, SUNY at Oswego, Oswego, NY Lines: 17 In article <440@bally.Bally.COM> siva@bally.Bally.COM (Siva Chelliah) writes: >#define half(x) (x)/2 >main () >{ > int i=5; > printf( "i/2 = %d\n",half(i-5)); >} >This program prints 3 instead of 0 ! How can I make it print 0 ? You could get a new compiler. ;^} Eric. ------------------------------------------------------------------------- The difference between emacs, and vi, | hunter@oswego.oswego.edu is like the difference between | {rutgers}!sunybcs!oswego!hunter making love, and masturbation. | hunter@snyoswva.bitnet