RE: sort()'s function reference arg

2008-08-25 Fir de Conversatie John Beckett
Robert Webb wrote: > I believe it's the same on all systems. qsort() just > compares the sign. Of course it would be impossible to check every qsort() on all systems(), but the fact that strcmp() uses that logic is a pretty good sign (!) that qsort() will as well. However, as others have poi

Re: sort()'s function reference arg

2008-08-25 Fir de Conversatie George V. Reilly
2008/8/24 Bram Moolenaar <[EMAIL PROTECTED]>: > Robert Webb wrote: > >> The help for sort() says the following with respect to the function >> reference argument: >> >> ...The function is invoked with two >> items as argument and must return zero if they are equal, 1 if >> the first on

Re: sort()'s function reference arg

2008-08-25 Fir de Conversatie Tony Mechelynck
On 25/08/08 05:07, Bram Moolenaar wrote: [...] > Vim uses qsort(). My man page says that the value of the compare > function can be any value less than, equal to or bigger than zero. > Is it like that on all systems? > Mine says the same; it also says CONFORMING TO SVr4, 4.3BSD, C89, C9

RE: sort()'s function reference arg

2008-08-25 Fir de Conversatie Robert Webb
Bram replied: > > The help for sort() says the following with respect to the function > > reference argument: > > > > ...The function is invoked with two > > items as argument and must return zero if they are equal, 1 if > > the first one sorts after the second one, -1 if the first o

Re: sort()'s function reference arg

2008-08-24 Fir de Conversatie Bram Moolenaar
Robert Webb wrote: > The help for sort() says the following with respect to the function > reference argument: > > ...The function is invoked with two > items as argument and must return zero if they are equal, 1 if > the first one sorts after the second one, -1 if the first one >