|
LIST.Max |
|
|
return = LIST.Max( lid AS HANDLE, itx AS INTEGER [=0], return-value AS INTEGER [=FALSE] ) AS VARIANT
return = LIST.Max( lid AS HANDLE, item AS STRING, return-value AS INTEGER [=FALSE] ) AS VARIANT
Returns the List Element Index or the Item Value of the Max in the List. The itx specifies the Item to look for. If omitted, first Item is used.
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 )
PRINT "Max: "; LIST.Max( hList, 0 ), PRINT "Max: "; LIST.Max( hList, 1 ), PRINT "Max: "; LIST.Max( hList, "Kalle", TRUE ), PRINT "Max: "; LIST.Max( hList, "Nisse", TRUE ),
PRINT "Min: "; LIST.Min( hList, 0 ), PRINT "Min: "; LIST.Min( hList, 1 ), PRINT "Min: "; LIST.Min( hList, "Kalle", TRUE ), PRINT "Min: "; LIST.Min( hList, "Nisse", TRUE ),
|