|
From: Barbara Morris Or for the LOOKUP opcode, you can set the factor 2 index to 901 before the LOOKUP: C eval n = 901 C 'x' lookup myarr(n) 10
The technique Barbara notes has been available for as long as I can remember; in fact, that's how we old dinosaurs used to save cycles when trying to weed out duplicates. We would load our array BACKWARDS, starting with the last element, and then do a lookup with a starting position. The other option was to make the array ascending and prefill the array with *HIVAL (or descending and use *LOVAL), but a lot of times we didn't have the luxury of getting our data to us in a sorted fashion. Joe
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.