Title: Message
----- Original Message -----
Sent: Thursday, June 03, 2004 4:27 PM
Subject: [DUG] "IN" an array?

Hi again all.
Just doing a simple little thing ATM where I have an arry to hold some values.
 
I want to do,
   
    IF iValue IN myArray THEN
        do whatever
 
But this is not valid.
Is there ay functions that can help me? basically I just want to see if a value is in an array.
 
How about holding them in a stringlist instead, and using something like
  if myList.IndexOf(iValue) <> -1
 
Or build a class that encapsulates an array and write it an IN method.
 
Or, depending on the values you're going to have in the array, can you use a set instead of an array?
 
 
Brian
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to