Variant.IsTextConstant() Method
Version: Available or changed with runtime version 1.0.
Indicates whether an AL variant contains a Text constant.
Syntax
Ok := Variant.IsTextConstant()
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 Text constant, otherwise false.
Example
The following example determines whether an AL variant contains a text constant. The code assigns the Text000 text constant to the variant variable that is named MyVariant. The IsTextCONSTANT method determines whether the variant contains a text constant and stores the return value in the varResult variable. In this case, the variant contains a text constant so Yes is returned and displayed in a message box.
var
MyVariant: Variant;
varResult: Boolean;
Text000: Label 'This is some text.';
Text001: Label 'Does the variant contain a text constant? %1.';
begin
MyVariant := Text000;
varResult := MyVariant.IsTextConstant;
Message(Text001,MyVariant,varResult);
Message(Text001,varResult);
end;