Sign in Join
FPDoc Onlineexperiment

VarAsType function

In unit Variants

Attempt to cast a variant to another type.

Declaration

pascal
function VarAsType(const V: Variant; aVarType: tvartype): Variant

Description

VarAsType attempts to cast the variant V to a new variant of type aVarType and returns the new variant.

Errors

If the requested type cast is not supported or possible, an EVariantTypeCastError exception may be raised.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.