User Tools

Site Tools


# $EPIC: igetitem.txt,v 1.2 2007/02/27 04:57:37 jnelson Exp $


$igetitem(<array> <index#>)


This function fetches a data item in the given array based on the index number. The index number is the position of the item based on its sorted-order. Remember that array items sort case-sensitive. Index 0 is the first item, in sorted order, whereas ${numitems(<array>)-1} is the last item, in sorted order.

Normally this operation is instantaneous, because arrays are always kept sorted. But if you use delitems or usetitem, the array can become unsorted, and is resorted the next time you fetch an item.


These functions are used to get an item in an array. The applications for these function should be obvious. The $igetitem() function, in particular, is useful for showing an array's contents in alphabetical order.


array item data, or empty string if array or item is not found


This function first appeared in “plus 3” (post-ircII, pre-EPIC).

igetitem.txt · Last modified: 2007/02/27 04:57 (external edit)