RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TSmallIntArray.Add Method

Adds a new element to the array.

Pascal
function Add(Value: SmallInt): Integer;
C++
__fastcall int Add(SmallInt Value);

Call Add to add an item to the end of an unsorted array, or to the appropriate position in a sorted array. To insert an element at a specified position within the array, use the Insert method instead.

Note: Add assumes that sorted arrays are sorted in ascending order. To use Add on an array where SortOrder is TS_DESCENDING, temporarily change the CompareProc property to a function that multiplies the value returned by CompareProc by -1.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!