Name

VarCopy Procedure

Syntax

procedure VarCopy(var Dest: Variant; const Source: Variant);

Description

VarCopy clears Dest and assigns a copy of Source to Dest.

VarCopy is not a real function.

Tips and Tricks

  • Assigning Dest := Source ends up calling the VarCopy procedure, but assignment is sometimes more efficient.

  • If Dest is an OleVariant, and Source is a Variant of type varString, VarCopy automatically converts the type to varOleStr.

See Also

OleVariant Type, Variant Type

Get Delphi in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.