Re: Warning meaning.



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

.



Relevant Pages

  • Re: Modes of Dismissal
    ... snip for space ... it's still not an elegant shot -- thrilling, ... See this is where I differ in my definition of beauty in batsmanship. ... Gower was another very pretty player to watch. ...
    (rec.sport.cricket)
  • Re: Question about (Optional)? header files.
    ... mdh wrote: ... snip ... ... Compiling the program using both the .c and .h (with appropriate ... the method of promulgating the prototype of a function to ...
    (comp.lang.c)
  • Re: How to access variable generated by genvarname
    ... Read question 4.6 in the newsgroup FAQ (linked in my signature) for some of ... as it avoids creating lots of small variables in your ...
    (comp.soft-sys.matlab)
  • Re: CD Sound Files - Time to download
    ... enabled you to download a very large file in more than one session. ... avoids the problem that an interruption means you have to start from scratch ...
    (comp.sys.acorn.misc)
  • Re: Is IOC Timer 0 usable in a non WIMP environment ?
    ... [SNIP] ... Well I could do everything with Timer 1 but 1/ I think it would be ... less elegant, 2/ I'd lose some CPU cycles each time I enter the code ...
    (comp.sys.acorn.programmer)