Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #13228

Re: qsort

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.chainon-marquant.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!74.125.46.80.MISMATCH!postnews.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail
NNTP-Posting-Date Sat, 12 Nov 2011 21:42:07 -0600
Message-ID <4EBF3C93.11EB@mindspring.com> (permalink)
Date Sat, 12 Nov 2011 22:42:11 -0500
From pete <pfiland@mindspring.com>
Reply-To pfiland@mindspring.com
Organization PF
X-Mailer Mozilla 3.04Gold (WinNT; I)
MIME-Version 1.0
Newsgroups comp.lang.c
Subject Re: qsort
References <4ebd2a87$0$19698$bbae4d71@news.suddenlink.net> <4EBDCB7A.2B15@mindspring.com> <4ebf0af7$0$19698$bbae4d71@news.suddenlink.net>
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Lines 20
X-Usenet-Provider http://www.giganews.com
NNTP-Posting-Host 4.154.216.216
X-Trace sv3-61yS/lzkMQQYeJNcKXy1iiUsb7ERL5+3XTmznNBLfwV9nNBJ4+X20rUwzeuLHtSRr2p8Kb+FD8ds1wt!CfTY/dGA8eWp7xsmAJsW419AnnCHGtIblpgv7GwEopge7pH0wJ9NjiIgksKvXRxkJ0bcGxkE7hWc!mIPry1OytSQ=
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 1458
Xref x330-a1.tempe.blueboxinc.net comp.lang.c:13228

Show key headers only | View raw


Bill Cunningham wrote:
> 
> pete wrote:
> >    return *aa > *bb ? -1 : *aa != *bb;
> 
>     Can you show me that for loop that's not in shorthand?
> This is kind of hard to read.

    if (*aa > *bb) {
        return -1;
    } else {
        if (*aa != *bb) {
            return 1;
        } else {
            return 0;
        }
    }

-- 
pete

Back to comp.lang.c | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

qsort "Bill Cunningham" <nospam@nspam.invalid> - 2011-11-11 09:00 -0500
  Re: qsort Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-11-11 06:56 -0800
    Re: qsort Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-11-11 16:39 +0000
      Re: qsort 88888 Dihedral <dihedral88888@googlemail.com> - 2011-11-12 10:19 -0800
  Re: qsort John Gordon <gordon@panix.com> - 2011-11-11 15:20 +0000
    Re: qsort "Bill Cunningham" <nospam@nspam.invalid> - 2011-11-11 14:22 -0500
  Re: qsort pete <pfiland@mindspring.com> - 2011-11-11 20:27 -0500
    Re: qsort "Bill Cunningham" <nospam@nspam.invalid> - 2011-11-12 19:10 -0500
      Re: qsort Keith Thompson <kst-u@mib.org> - 2011-11-12 16:40 -0800
        Re: qsort "Bill Cunningham" <nospam@nspam.invalid> - 2011-11-13 01:39 -0500
          Re: qsort Ian Collins <ian-news@hotmail.com> - 2011-11-13 19:51 +1300
            Re: qsort Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-11-14 02:14 +0200
            Re: qsort Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-11-14 00:43 -0800
      Re: qsort pete <pfiland@mindspring.com> - 2011-11-12 22:42 -0500

csiph-web