LIST.Find

Previous  Next

 

lex = LIST.Find( lid       AS HANDLE,

                 itx       AS INTEGER,

                 value     AS VARIANT,

                 start-lex AS INTEGER [=LS_Front] ) AS INTEGER

 

lex = LIST.Find( lid       AS HANDLE,

                 item      AS STRING,

                 value     AS VARIANT,

                 start-lex AS INTEGER [=LS_Front] ) AS INTEGER

 


 

Finds the List Element specified by the itx or item name.  Optionally, the starting List Element can be specified.  The function returns the List Element Index if found otherwise it returns LS_Fail.

 

Example:

 

DIM hList AS HANDLE

 

hList = LIST.Create( "Kalle", STRING, "Nisse", REAL, 4 )

 

LIST.At( hList, 0, 0, "Kalle Anka      " )

LIST.At( hList, 0, 1, 1.234 )

LIST.At( hList, 1, 0, "Kajsa Anka      " )

LIST.At( hList, 1, 1, 2.345 )

LIST.At( hList, 2, 0, "Joakim von Anka " )

LIST.At( hList, 2, 1, 3.456 )

LIST.At( hList, 3, 0, "Farmor Anka     " )

LIST.At( hList, 3, 1, 4.567 )

 

DIM lex AS INTEGER

 

lex = LIST.Find( hList, "Kalle", "Farmor Anka     " )