Ross,

I think your string list method will work, and there is no need to re-order
the array.  All you do is instead of sequentially reading the elements out
of the array, you read them in the string list sequence and write to the
text file.

Dennis.

----- Original Message -----
From: "Ross Levis" <[EMAIL PROTECTED]>
To: "NZ Borland Developers Group - Delphi List" <[EMAIL PROTECTED]>
Sent: Thursday, May 27, 2004 10:26 AM
Subject: Re: [DUG] dynamic array items


Hi Dennis

> The other consideration is why you would want to sort the array - is it
for
> display, or is it for easier retrieval?

It's not for display purposes as such, but each item is retrieved
sequentially from the array and placed in a text file.  The order was
previously not important.

> What is the sort key?

It will be sorted on a portion of one of the string fields of the record.

> Is it easier
> to put the keys into a TStringList using AddObject, with the index of the
> element as the "object" pointer, and sort the string list?

That's what I'm doing in the code I posted, but only temporarily, then
trying to re-arrange the order of the array, which obviously you can't do.
I'll work something out.

Cheers,
Ross.


----------------------------------------------------------------------------
----


> _______________________________________________
> Delphi mailing list
> [EMAIL PROTECTED]
> http://ns3.123.co.nz/mailman/listinfo/delphi
>
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to