Skip to content

Latest commit

 

History

History
59 lines (49 loc) · 1.96 KB

File metadata and controls

59 lines (49 loc) · 1.96 KB
title description ms.author ms.date ms.tgt_pltfrm ms.topic author
Variant.IsByte() Method
Indicates whether an AL variant contains a Byte data type variable.
solsen
02/26/2024
na
reference
SusanneWindfeldPedersen

Variant.IsByte() Method

Version: Available or changed with runtime version 1.0.

Indicates whether an AL variant contains a Byte data type variable.

Syntax

Ok :=   Variant.IsByte()

Note

This method can be invoked using property access syntax.

Parameters

Variant
 Type: Variant
An instance of the Variant data type.

Return Value

Ok
 Type: Boolean
true if the AL variant contains a Byte variable, otherwise false.

Example

The following example determines whether an 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 method 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 true is returned and displayed in a message box.

var
    MyByte: Byte;
    MyVariant: Variant;
    varResult: Boolean;
    Text000: Label 'Does the variant contain a byte variable? %1.';
begin
    MyByte := 'A';  
    MyVariant := MyByte;  
    varResult := MyVariant.IsByte;  
    Message(Text000,varResult);  
end;

See Also

Variant Data Type
Get Started with AL
Developing Extensions