demo for using of qsort from lib and a little problem with it_(re)
10 Sep 1997 14:36:00 +0200
Hello Peter,
you said:
> > program Sort_Test;
> > [...]
> > procedure qsort(var base; numelem, size : Integer; cmp: FuncType); C;
>
> Better say `cmp: Pointer' here because you don't really know the
> type of the function `cmp' is pointing to.
No - IMHO qsort need always a function (cmp) that return an Integer, but
the parameters/arguments of this function are pointers on different types.
> > qsort(tb, 5, Sizeof(tb[1]), @CompString);
>
> The resulting error ("too few arguments") is fixed now. Thanks.
You found also the reason for the crash on sorting a "array of Byte"?
Look at my sample!
___,
((__ o
,____)) V E N I
Sven Hilscher (Sven@rufus.central.de (Sven Hilscher))
HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada -
Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es