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




Actually, I think you can use the " in" operator

something like 23 in myArray , myArray being the array name, it
will return true and the sysvar.ArrayIndex will contain the element
number.

Look in the EGL language reference under expressions and operators

Claus Weiss Visual AD tools, email: weiss@xxxxxxxxxx
Dept XF6 IBM Canada Lab tie 313-3987 Phone(905)413-3987 FAX(905)413-4850
Greetings from Toronto
Rational Software System i - Ecosystem Team



Jason Abreu
<abreuj@xxxxxxxxx
12.fl.us> To
Sent by: egl-i@xxxxxxxxxxxx
egl-i-bounces@mid cc
range.com
Subject
Re: [EGL-i] can an array be
03/11/2009 07:54 searched
AM


Please respond to
EGL on and around
the IBM i
<egl-i@xxxxxxxxxx
om>






I believe you are correct.

I believe the best way is to do a for loop and search the field you need
for the values you are looking for.

--Jason

tim wrote:
Is there a way to search an array without doing a loop.



So, if array has values 1,4,55,23,556,2,65,632,34 and I am looking for
23,
can this be done with any type of built in function?



If not, im guessing the best way is using a for loop and do a compare.



--
This is the EGL on and around the IBM i (EGL-i) mailing list
To post a message email: EGL-i@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/egl-i
or email: EGL-i-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/egl-i.

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.