cvs.gedasymbols.org/archives/browse.cgi | search |
Mime-Version: | 1.0 |
To: | Bill Currie <bill AT taniwha DOT tssc DOT co DOT nz>, djgpp AT delorie DOT com |
From: | Nate Eldredge <nate AT cartsys DOT com> |
Subject: | Re: Programming Prob. |
Date: | Wed, 29 Apr 1998 15:47:26 -0700 |
Message-ID: | <19980429224701.AAF11144@ppp123.cartsys.com> |
At 09:14 4/29/1998 +1200, Bill Currie wrote: >Nate Eldredge wrote: >> Additional trivia: If using GNU C++, you can say: >> >> answer = int1 >? int2; > >Isn't that: > >answer = int1 ?: int2; No, that would have equivalent behavior to: if (int1 != 0) answer = int1; else answer = int2; The way I suggested is supported in GNU C++ (but not C). See info node "gcc" "C++ Extensions" "Min and Max". Nate Eldredge nate AT cartsys DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |