AutoIt file: Lists.au3
A list is a 1D or 2D array for storing values with easy manipulation and access functions. A 2D list can have up to 20 columns. A list position is zero-based (as an array).
Local $aCats = _ListCreate(2) | ; 2 columns list |
_ListAdd( $aCats, "siamese", "red" ) | ; add red siamese cat |
_ListAdd( $aCats, "balinese", "white" ) | ; add white balinese cat |
_ListValueInList( $aCats, "siamese" ) | ; returns 0 as "siamese" is in first row |
_ListValueInList( $aCats, "white" ) | ; returns 1 as "white" is in second row |
_ListValueInListColumn( $aCats, 0, "white" ) | ; returns -1 as "white" isn't in column 0, the first column |
_ListCreate | Creates a 1D or 2D list for storing values, maximum 20 columns |
_ListIsList | Tests if given array is a list |
_ListIsEmpty | Tests if list is empty |
_ListClear | Clears a list |
_ListAdd | Adds an element (row) to a list |
_ListInsert | Inserts an element (row) at given position into a list |
_ListSet | Sets columns of an element of a list |
_ListRemove | Removes an element from the list of given value |
_ListRemoveByValue | Removes an element from the list of given value. Value can be any column of the list |
_ListRemoveByColumnValue | Removes an element from the list of given value in given column |
_ListGet | Gets (array) value of given position of a list |
_ListGetColumn | Gets (column) value of given position of a list |
_ListValueInList | Tests if a value is any column of the list |
_ListValueInListColumn | Tests if a value is in given column of the list |
_ListSize | Gets list size |
_ListToArray | Creates an array from the given list |
_ArrayToList | Creates a list from the given array |