home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!ames!pacbell.com!rtech!ingres!jonm
- From: jonm@Ingres.COM (God is real unless declared integer)
- Subject: Re: Hows this for odd
- Message-ID: <1992Nov13.141052.4827@pony.Ingres.COM>
- Summary:
- News-Software: VAX/VMS VNEWS 1.4-b1
- Keywords:
- Organization: ASK Computer Systems, Ingres Product Division
- References: <1992Nov9.102217.23060@monu6.cc.monash.edu.au>
- Date: 13 Nov 92 14:10:52 GMT
- Lines: 25
-
- In article <1992Nov9.102217.23060@monu6.cc.monash.edu.au>, bena@yoyo.cc.monash.edu.au (Ben Aveling) writes...
- >
- >Just recently I saw the following fragment of code, and I thought I'd share
- >it with you all. (This is real code, part of a real program people will
- >pay money for.)
- >
- > ... ,(i==0)?TRUE:FALSE,...
- >
- >Am I going mad, or is this slightly redundant ?
- >
- Ben,
- Not necessarily so. What if you have a different definition for
- TRUE and FALSE (-1, 0) (or even true=0, false=1). This would mean a nice
- portability filter especially when you start using borrowed code.
-
- If anything you could say... why didn't they just use
-
- if (!i)
- ...
-
- ________________________. Don't judge a book by your cover...
- Jon Machtynger | All opinions expressed above are mine or
- jonm@ingres.com | borrowed... do you understand that! You can
- ________________________| just leave the company out of this!
-
-