System.VarArrayRedim

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure VarArrayRedim(var A: Variant; HighBound: Integer);

C++

extern void __fastcall  VarArrayRedim(Variant& a, int high);

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.pas
sysvari.h
System System

Description

Resizes a Variant array.

VarArrayRedim resizes the given Variant array by changing the high bound of the rightmost dimension to the given value. The A parameter can be a Variant or an OleVariant, and it must be possible to assign a value to A (A must be an lvalue).

Existing elements of the array are preserved, and new elements are set to zero or empty. An EVariantArrayCreateError exception is thrown if the Variant given by A is not an array, or if there is not enough memory to resize the array.

Note: A Variant array cannot be resized while it is locked.

See Also


Code Examples