I have declared System.Variants in Uses and LSP is happy with the following statement:
WIDBCDS.Locate('StartTime;Title',VarArrayOf([x, y ]),[]);
But the compiler objects with error message:
[Error] CWRmainForm.pas(540): identifier not found "VarArrayOf"
So, I tried a lower-level approach to create the requisite variant array as follows. This also passed the LSP but failed the compiler:
var
st: TDateTime;
vals: Variant;
begin
...
st := <a TDateTime>
vals := VarArrayCreate([0,1], varVariant);
VarArrayPut(vals, st, [0]);
VarArrayPut(vals, 'a string', [1]);
...
[Error] CWRmainForm.pas(532): identifier not found "Variant"
What am I doing wrong?