第二个参数准确地说不是集合,是常量数组,不能用集合操作符来处理的.
function Format(const Format: string
const Args: array of const): string;
但因为是数组,所以可以用下标来引用:
function Format(const Format: string
const Args: array of const): string;
var
i: integer;
begin
for i:=0 to High(Args) do
begin
case TVarRec(Args).VType of
case VType of
vtInteger: ...
vtBoolean: ...
vtChar: ...
vtExtended: ...
vtString: ...
vtPointer: ...
vtPChar: ...
vtObject: ...
vtAnsiString: ...
vtCurrency: ...
... ...
end;
end;
end;