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



Hi Barbara -

>jt, LOOKUP indeed still uses a sequential search.  But the new %lookup
>builtin does a binary search for ordered arrays.  %lookup can behave
>this new (new for RPG ...) way because there's no compatability issue.
>
>(LOOKUP can't change to a binary search because of possibly desirable
>behaviour with arrays that are not actually sorted.  We won't change the
>behaviour, whether or not it's documented.)

Even though LOOKUP does a sequential search of ordered arrays, am I correct
in my remembory that if you are doing a search only for equal on an
ascending array, the search will stop in a not found condition if an element
is encountered that is greater than the search value?  (Even the element
does exist later in the array because the data is not actually in ascending
order.)

Ken
Southern Wine and Spirits of Nevada, Inc.
Opinions expressed are my own and do not necessarily represent the views of
my employer or anyone in their right mind.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.