Hi Mattias, On 24 April 2011 09:31, Mattias Gaertner <[email protected]> wrote:
> On Sun, 24 Apr 2011 08:58:07 +1000 > Peter E Williams <[email protected]> wrote: > > > Hi All, > > > > I am having a problem with a strange run-time AV error. See the link to > the > > Lazarus project. > > > > Download link: > > http://hotfile.com/dl/115480488/6b7a8ed/dtm_maker_001.zip.html > > > > The problem is in the QSort procedure: > > > >[...] > > pivot := island_single_array[left].location_number; > > "pivot" is the key of the pivot element at position "left". > > >[...] > > pivot := island_single_array[left].location_number; > > left := lower1; > > right := upper1; > > if left < pivot then > ^^^^^^^^^^^^ > Comparing a position and a key makes no sense. > > You have to keep track of the position of the pivot element. See the > quicksort implementation in TFPList.Sort. > > Could you please give me a link to the TFPList.Sort code so that I can use that code (via cut and paste) in my unit ? Thanks and best regards, Peter / pew > Mattias > > -- > _______________________________________________ > Lazarus mailing list > [email protected] > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
