× 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.



Lim Hock-Chai wrote:

Does binary search still apply if I pass the start index to %lookup? And doesn't array by default ascending?


Here is what I'm dealing with. I need to load some data in a file to an array and then do a lookup in this array. Because many records are in these file, I, therefore, try to use a number that is big enough to support grow. Of course, the bigger the array, the longer the search. I'm thinking if I can sort it first and then tell lookup to search from the first non blank index, that will reduce the processing time.




First, an array is considered sequenced only if keyword ASCEND or DESCEND is specified on its definition. (The default applies to the SORTA opcode. Unsequenced arrays are sorted by SORTA in ascending order.)


Second, since the data is already in a file, why not just define a logical view of it and use that to search for what you want? That's much easier, and probably faster too.

Cheers! Hans


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.