Show: Delphi C++
Display Preferences

System.High

From RAD Studio API Documentation
Jump to: navigation, search

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 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.

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.


See Also

Code Examples

Personal tools
RAD Studio 10.2 Tokyo
In Other Languages
Previous Versions
Assistance