Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!smurf!altger!doitcr!de.intel.com!intelhf!ichips!iwarp.intel.com!inews!nevin!bhoughto From: bhoughto@nevin.intel.com (Blair P. Houghton) Newsgroups: comp.lang.c Subject: Re: How to write a sorting program that will sort everything? Message-ID: <3418@inews.intel.com> Date: 24 Mar 91 02:14:57 GMT References: <1991Mar22.005700.17663@minyos.xx.rmit.oz.au> <3403@inews.intel.com> <1991Mar23.164807.7318@helios.physics.utoronto.ca> Sender: news@inews.intel.com Organization: Intel Corp, Chandler, AZ Lines: 20 In article <1991Mar23.164807.7318@helios.physics.utoronto.ca> neufeld@aurora.physics.utoronto.ca (Christopher Neufeld) writes: >In article <3403@inews.intel.com> bhoughto@pima.intel.com (Blair P. Houghton) writes: >>It can't be done. You can always define a type of input >>for which "sorting" isn't defined. >> > Huh? I may be relatively new to C but isn't the stdlib function >qsort() an example of a program which does just that? You pass it the Y'know, it would've helped a little if you'd just bothered to read down to the end of my posting. It was qsort-a-rama... It still doesn't solve the problem of "sorting any data type", since that problem is impossible to solve (I.e., you have to know in advance the types that may be passed, which necessarily omits those types you do not know and which are, by the definition of the word "any", part of the set "any data type"). --Blair "Here, have a NULL-prize..."