Title: Message
you'll have to iterate the array and check each value for a match
 
something like ::
 
for i := low(myArray) to high(myArray) do
  if myArray[i] = iValue then
  begin
    // match found
    break;
  end;
 
IN is a set operator.
-----Original Message-----
From: Jeremy Coulter [mailto:[EMAIL PROTECTED]
Sent: 3 June 2004 2:27 PM
To: [EMAIL PROTECTED]
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.
 
 
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to