I am trying to convert Delphi2005 code to Delphi Tokyo 10.2.3 code.
The function VarType
is no longer recognized.
I need the function VarType
to determine the basic type of a variant variable. In general I find, according to many postings, that it should be in the unit System.Variants
. However, if I search e.g. in:
It is not in this unit. Furthermore, I cannot find the unit variants, only a unit variant. However, using the unit variant I get a runtime error:
Record, object or class type necessary
. So this doesn't work.
if (System.Variant.VarType(Value) and varTypeMask) =
System.Variant.varString then // VarType(Value) unbekannt
begin
TByte8Array(PRecFORMULA3(PBuf).Value)[0] := 0;
end;
Anyway I don't find VarType
in System.variant. Does variants not exist anymore?
Can anyone help me?