RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DynamicArray::High Property

Indicates the high bounds of the array.

Pascal
property High: Integer;
C++
__property int High;

Reading the System::DynamicArray::High property returns Length-1.  

The following function returns the sum of the contents of an integer type System::DynamicArray

int TotalArray(const System::DynamicArray<int>& arrayOfInt)

{
int total=0;
for (int i=arrayOfInt.Low; i<=arrayOfInt.High; i++)
    total += arrayOfInt[i];
return total;
}

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!