× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 10/16/2010 9:03 AM, Barbara Morris wrote:

Using the n+1 method means you don't have to even ponder the possibility
that your sentinel value is also a possible valid value in your array.

And with dynamic array handling, it's so much nicer. Back in the day we had to jump through hoops like pre-sizing the array to the maximum value we would EVER need and then filling the data from the last element backward so that we could use a starting index to reduce our lookup time. (And of course we always ended up exceeding the maximum size, usually in the middle of moth-end processing.)

Other fun was prefilling the array with high values and sorting. This let you read data unsequenced and stuff it in the array, and then sort it using SORTA, knowing that all the unused elements would be at the end. Ah, fun!

In this wonderful new world of dynamic arrays, %SUBARR and sorting data structures, we can do things we never dreamed of <smile>.

Speaking of which, I never tried to dynamically allocate an array of data structures and then sort only a subset of them. That should work, right? Hmmmm...

Joe


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.