Indicates whether a C/AL variant contains a Byte data type variable.

Ok := Variant.ISBYTE

Parameters

Variant

Type: Variant

Property Value/Return Value

Type: Boolean

true if the C/AL variant contains a Byte data type variable; otherwise, false.

Example

The following example determines whether a C/AL variant contains a Byte data type variable. The code initializes the MyByte data type variable with the constant text string A. The MyByte variable is assigned to the variant variable that is named MyVariant. The ISBYTE function determines whether the variant contains a Byte variable and stores the return value in the varResult variable. In this case, the variant contains a Byte variable so Yes is returned and displayed in a message box. This example requires that you create the following variables and text constants in the C/AL Globals window.

Variable name DataType

MyByte

Byte

MyVariant

Variant

varResult

Boolean

Text constant name Enu value

Text000

Does the variant contain a Byte variable? %1.

 Copy Code
MyByte := 'A';
MyVariant := MyByte;
varResult := MyVariant.ISBYTE;
MESSAGE(Text000,varResult);

See Also