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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈