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



Buck Calabro wrote:
Does V4R5M0 of RPG do a binary search
to find the equal condition and only
read the entrys until it gets a match
or will it read all entries before giving
me an equal condition? If the latter,
does V5R1M0 make any changes
to this processing?

I could not find a reference in the RPG Reference, but I believe the LOOKUP
opcode always does a read/compare loop, while the %lookup BIF does a binary
search.
Just to clarify: Yes, the LOOKUP opcode always does a sequential
search through the data. %LOOKUP() and %TLOOKUP() do a binary search
on ordered arrays only. That is, arrays with keyword ASCEND or
DESCEND. Otherwise, it's still a sequential search.

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.