According to Sven Hilscher:
According to myself (Peter Gerwinski):
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.
True, but your `FuncType' points to a *parameterless* function which returns an integer. This is certainly a type conflict with the actual functions.
You found also the reason for the crash on sorting a "array of Byte"?
I cannot reproduce this one - neither with gpc-970714 nor with my current development GPC. :-( With which version and on which platform does it occur?
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201] maintainer GNU Pascal [970714] - http://home.pages.de/~gnu-pascal/ [970125]