[Lazarus] QuickSort procedure - raised exception class 'External SIGSEGV'
Joerg Schuelke
joerg.schuelke at gmx.de
Mon Mar 14 14:58:08 CET 2011
Am Mon, 14 Mar 2011 23:41:56 +1100
schrieb Peter Williams <pewilliams2010 at live.com>:
>
> Hi Joerg,
>
> > Date: Mon, 14 Mar 2011 10:17:09 +0100
> > From: joerg.schuelke at gmx.de
> > To: lazarus at lists.lazarus.freepascal.org
> > Subject: Re: [Lazarus] QuickSort procedure - raised exception class
> > 'External SIGSEGV'
> >
> > Am Mon, 14 Mar 2011 15:29:36 +1100
> > schrieb Peter Williams <pewilliams2010 at live.com>:
> >
> > > Procedure QuickSort( Var island_single_array : island_single_type;
> > > left, right : integer);
> > > Var
> > > d : island_single_type;
> >
> > The initialzation of d is missing. Accessing d results SIGSEGV. In
> > the original code d is initialized by
> >
> > > d : ptrArray Absolute da;
> >
> > thats now broken. What do you think how many implementations of
> > quicksort are around? Is it realy needed to write a new one?
> > Excuse my bad english, i'm native german speaking.
> >
> I am well aware that that's what is now broken. I am asking how to
> fix it. I am sure that there are many QuickSorts around but I was
> trying to work with a legacy one which I had on my hard disk. E.g. I
> need a version that works. I would really like to know how to make it
> work. If someone knows how to make it work, then now would be the
> time to speak up. :-) PEW
>
> > --
> > _______________________________________________
> > Lazarus mailing list
> > Lazarus at lists.lazarus.freepascal.org
> > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
Delete the line
d : island_single_type;
and replace all occurrences of d by island_single_array.
The absolute directive means there is a variable d taking the same
place in memory as the other one - in your example code the untyped
formal procedure parameter da -, like an alias.
More information about the Lazarus
mailing list