ArrayList < Handle

Last Updated2025-11-08
Created At2014-07-05

Methods20
SymbolDescription
ArrayListCreates a dynamic global cell array. While slower than a normal array, it can be used globally AND dynamically, which is otherwise impossible. The contents of the array are uniform; i.e. storing a string at index X and then retrieving it as an integer is NOT the same as StringToInt()! The "blocksize" determines how many cells each array slot has; it cannot be changed after creation.
ClearClears an array of all entries. This is the same as Resize(0).
CloneClones an array, returning a new handle with the same size and data. This should NOT be confused with CloneHandle. This is a completely new handle with the same data but no relation to the original. It should be closed when no longer needed.
EraseRemoves an array index, shifting the entire array down from that position on. For example, if item 8 of 10 is removed, the last 3 items will then be (6,7,8) instead of (7,8,9), and all indexes before 8 will remain unchanged.
FindStringReturns the index for the first occurrence of the provided string. If the string cannot be located, -1 will be returned.
FindValueReturns the index for the first occurrence of the provided value. If the value cannot be located, -1 will be returned.
GetRetrieves a cell value from an array.
GetArrayRetrieves an array of cells from an array.
GetStringRetrieves a string value from an array.
PushPushes a value onto the end of an array, adding a new index. This may safely be used even if the array has a blocksize greater than 1.
PushArrayPushes an array of cells onto the end of an array. The cells are pushed as a block (i.e. the entire array sits at the index), rather than pushing each cell individually.
PushStringPushes a string onto the end of an array, truncating it if it is too big.
ResizeResizes an array. If the size is smaller than the current size, the array is truncated. If the size is larger than the current size, the data at the additional indexes will not be initialized.
SetSets a cell value in an array.
SetArraySets an array of cells in an array.
SetStringSets a string value in an array.
ShiftUpShifts an array up. All array contents after and including the given index are shifted up by one, and the given index is then "free." After shifting, the contents of the given index is undefined.
SortSort an ADT Array. Specify the type as Integer, Float, or String.
SortCustomCustom sorts an ADT Array. You must pass in a comparison function.
SwapAtSwaps two items in the array.
Properties2
SymbolTypeDescription
BlockSizeintRetrieve the blocksize the array was created with.
LengthintRetrieve the size of the array.