Unit 'System' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

VarCast

Cast a variant to a certain type.

Declaration

Source position: varianth.inc line 381

procedure VarCast(

  var dest: variant;

  const source: variant;

  vartype: LongInt

);

Description

VarCast converts the variant in Source to the type indicated in VarType and returns the result in dest. The VarType must be one of the predefined VarNNN constants.

Errors

If the conversion is not possible because the value cannot be correctly casted, then a run-time error or an exception may occur.


Documentation generated on: Jul 24 2023