type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{函数}
function GetVarType(const v: Variant): string;
begin
case VarType(v) of
varEmpty : Result := 'Empty';
varNull : Result := 'Null';
varSmallint : Result := 'Smallint';
varInteger : Result := 'Integer';
varSingle : Result := 'Single';
varDouble : Result := 'Double';
varCurrency : Result := 'Currency';
varDate : Result := 'Date';
varOleStr : Result := 'OleStr';
varDispatch : Result := 'Dispatch';
varError : Result := 'Error';
varBoolean : Result := 'Boolean';
varVariant : Result := 'Variant';
varUnknown : Result := 'Unknown';
varShortInt : Result := 'ShortInt';
varByte : Result := 'Byte';
varWord : Result := 'Word';
varLongWord : Result := 'LongWord';
varInt64 : Result := 'Int64';
varStrArg : Result := 'StrArg';
varString : Result := 'String';
varAny : Result := 'Any';
varTypeMask : Result := 'TypeMask';
varArray : Result := 'Array';
varByRef : Result := 'ByRef';
end;
end;