The C/AL variant data type can contain any variants from OCX and Automation objects (VT_VARIANT). However, not all these values can be mapped to C/AL values. For more information, see Using COM Technologies in C/SIDE.

The variant data type can contain the following C/AL data types:

You can use the variant data type to pass Automation variants from one external component (Automation or OCX) to another. This requires that the recipient component can accept the original variant. You can also assign a C/AL variable to a variant and pass it to an external component. When you pass C/AL variants ByRef to an external COM component, small conversion differences may occur. Therefore, we recommend that you pass C/AL variants ByVal if you do not need to assign a new value to the C/AL variant in your external component.

Expand imageReturning Variants in Internal Function Calls

Expand imageReturning DateTime Variants

Expand imageVariants and Approximation

Expand imageAssigning Automation Variants to FieldRef Values

Expand imageSee Also