home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / c / 18957 < prev    next >
Encoding:
Text File  |  1992-12-29  |  1.1 KB  |  33 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!wupost!spool.mu.edu!umn.edu!lynx!nmsu.edu!opus!afoiani
  3. From: afoiani@nmsu.edu (Anthony Foiani)
  4. Subject: Re: QUESTION: TRICKS USING THE ? : OPERATOR
  5. In-Reply-To: hollasch@kpc.com's message of Wed, 23 Dec 1992 00:16:17 GMT
  6. Message-ID: <1992Dec29.040142.25385@nmsu.edu>
  7. Sender: usenet@nmsu.edu
  8. Organization: NMSU Computer Science
  9. References: <dsembr01.725056046@starbase.spd.louisville.edu>
  10.     <1992Dec23.001617.9462@kpc.com>
  11. Date: Tue, 29 Dec 1992 04:01:42 GMT
  12. Lines: 19
  13.  
  14.  
  15. In much the same vein, one of my favorites goes something like this:
  16.  
  17.    int a, b, c;
  18.  
  19.    *(c?&a:&b) = val;
  20.  
  21. Not that this is really "recomended".  With one notable exception*,
  22. your goal should always be the most readable code; if an "if"
  23. statement is more readable than a nested arithmatic conditional, the I
  24. recommend the "if" statement.  IMHO, of course.
  25.  
  26. * The IOCCC, of course!
  27.  
  28. Tony
  29. --
  30. Tony Foiani  a.k.a. Tkil  (afoiani@nmsu.edu) or (tkil@acca.nmsu.edu)
  31. Supporting:  Unix / DOS / VMS / Macintosh / "What's this?"
  32.    Current favorite song: "Take To The Sky", Tori Amos, _Winter_ [CD5]
  33.