[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Variants' (#rtl)

TCustomVariantType.Copy

Copy a custom variant value

Declaration

Source position: variants.pp line 204

public procedure TCustomVariantType.Copy(

  var Dest: TVarData;

  const Source: TVarData;

  const Indirect: Boolean

); virtual; abstract;

Arguments

Dest

  

Destination custom variant

Source

  

Source custom variant

Indirect

  

Must the copy be indirect

Description

Copy is used when a custom variant value is assigned to another variant. This is an abstract method that must be overridden and implemented in descendent classes. When the method returns, the type of the Dest variant record must be equal to the Source type (the custom varant type value).

If Indirect is True source contains a reference to the custom variant. In that case, dest should also contain a reference.

Errors

If this method is not overridden, an abstract error will be thrown.

See also

TCustomVariantType.Clear

  

Clear a value


Documentation generated on: Jun 22 2020