|
Vern Hamberg wrote:
-snip-Now when you do the sort you describe, do it just as you have it - theYou can't sort the data structure array by specifying one of the
subfields end up being arrays, would you believe, and sorting one takes
all the rest with it.
subfields even if the subfields are defined to overlay the DS.
This is illegal if ArSf1 is an array:
SORTA ArSf1.ArField4
But in 7.1, you can code this to sort the ArSf1 data structure array by
the ArField4 subfield, keeping the other subfields in synch the way
Booth wants:
SORTA ArSf1(*).ArField4
Prior to 7.1, you have to jump through a few hoops to sort the DS array
by one of its subfields. Paul's article mentions one way using
pointers, but that way seems quite error prone to me. I'd use qsort
instead no matter how big the array is; qsort is quite straightforward
once you'd done it once.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.