delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/29/18:32:41

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Programming Prob.
Date: Wed, 29 Apr 1998 18:30:08 -0400
Organization: Two pounds of chaos and a pinch of salt.
Lines: 26
Message-ID: <3547A9F0.2C60@cs.com>
References: <19980429033703 DOT AAP3301 AT ppp104 DOT cartsys DOT com> <3546EF5E DOT B81A9418 AT taniwha DOT tssc DOT co DOT nz>
NNTP-Posting-Host: ppp123.cs.net
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Bill Currie wrote:
> 
> Nate Eldredge wrote:
> > Additional trivia: If using GNU C++, you can say:
> >
> > answer = int1 >? int2;
> 
> Isn't that:
> 
> answer = int1 ?: int2;

In C, I would write it as:

answer = int1 > int2 ? int1 : int2;

I could not believe what Nate posted, because it looked so incredibly
syntactically obscure.  So I tried it with gpp and it worked.  I don't
see how it makes the operation any clearer, though.  :-)

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I  |     mailto:fighteer AT cs DOT com     |
|      ICQ UIN#:  7406319          |   http://www.cs.com/fighteer/  |
|    ObJoke:  If Bill Gates were a robber, not only would he        |
|     shoot you, but he'd send you a bill for the bullets.          |
---------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019