-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGetVariantType.pas
More file actions
27 lines (27 loc) · 918 Bytes
/
GetVariantType.pas
File metadata and controls
27 lines (27 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function GetVariantType(const v: variant): string;
//
// Retorna de que tipo é a variavel especificada
//
begin
case TVarData(v).vType 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';
varByte: result := 'Byte';
varString: result := 'String';
varTypeMask: result := 'TypeMask';
varArray: result := 'Array';
varByRef: result := 'ByRef';
end;
end;