System.High
Delphi
function High(var X): Integer;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.pas | System | System |
Description
Returns the highest value in the range of an argument.
In Delphi code, call High to obtain the upper limit of an Ordinal, Array, or ShortString value. The result type is X, or the index type of X.
X is either a type identifier or a variable reference. The type denoted by X, or the type of the variable denoted by X, must be one of the following.
For this type | High returns |
---|---|
Ordinal type (includes Int64) |
The highest value in the range of the type. |
Array type |
The highest value is within the range of the index type of the array. For empty arrays, High returns –1. |
short string type |
The declared size of the string. |
Open Array |
The value of type Integer, giving the number of elements in the actual parameter, minus one. |
AnsiString |
Returns the string length when Zero Based Strings is |
WideString |
Returns the string length when Zero Based Strings is |
UnicodeString |
Returns the string length when Zero Based Strings is |
short string parameter |
The value of type Integer, giving the number of elements in the actual parameter, minus one. |
Note: High does not apply for array properties.