×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Tim,

There is a slide in one of Jon Sayles' presentations titled "IN Conditional Operator - Searching through arrays in a single statement"

I suggest doing a search through the RBD help for "sysvar.arrayIndex" (since searching on 'in' will get a lot of hits!)

in will search for a value in an array, and set the variable sysvar.arrayIndex to the array index where the value was found. Avoids coding up a loop.
I have no idea if this performs better than an explicit loop or not, but certainly is cleaner style-wise.

date: Wed, 1 Jul 2009 12:42:48 -0400
from: "tim" <tim2006@xxxxxxxxxxx>
subject: [EGL-i] lookup value in an array

I have an array of several hundred elements. Is there a way to lookup the
index the value is at without having to manually loop though the array.


This thread ...


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

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