Re: Warning meaning.
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Fri, 22 Jun 2007 11:03:07 -0400
mdh wrote:
Richard Heathfield <r...@xxxxxxxxxxxxxxx> wrote:.... snip ...
return (*s > *t) - (*s < *t);
Thanks ...never seen it that way...but it is quite elegant.
Since it never deals with numbers greater than 1, it avoids all
possibilities of overflow. Also works for all numerical types for
*s and *t.
--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
cbfalconer at maineline dot net
--
Posted via a free Usenet account from http://www.teranews.com
.
- Follow-Ups:
- Re: Warning meaning.
- From: mdh
- Re: Warning meaning.
- References:
- Warning meaning.
- From: mdh
- Re: Warning meaning.
- From: Keith Thompson
- Re: Warning meaning.
- From: mdh
- Re: Warning meaning.
- From: Richard Heathfield
- Re: Warning meaning.
- From: mdh
- Warning meaning.
- Prev by Date: Re: Warning meaning.
- Next by Date: Re: void pointer
- Previous by thread: Re: Warning meaning.
- Next by thread: Re: Warning meaning.
- Index(es):
Relevant Pages
|