Функция VType |
Функция VType возвращает тип значения хранящегося в переменной v : variant
function VType (v : variant) : word;
v : variant - выражение типа variant.
Возвращает тип хранящегося в переменной v значения:
const VT_EMPTY = 0; // [V] [P] nothing const VT_NULL = 1; // [V] SQL style Null const VT_I2 = 2; // [V][T][P] 2 byte signed int const VT_I4 = 3; // [V][T][P] 4 byte signed int const VT_R4 = 4; // [V][T][P] 4 byte real const VT_R8 = 5; // [V][T][P] 8 byte real const VT_CY = 6; // [V][T][P] currency const VT_DATE = 7; // [V][T][P] date const VT_BSTR = 8; // [V][T][P] binary string const VT_DISPATCH = 9; // [V][T] IDispatch FAR* const VT_ERROR = 10; // [V][T] SCODE const VT_BOOL = 11; // [V][T][P] true=-1, false=0 const VT_VARIANT = 12; // [V][T][P] VARIANT FAR* const VT_UNKNOWN = 13; // [V][T] IUnknown FAR* const VT_DECIMAL = 14; // [V][T][S] 16 byte fixed point const VT_I1 = 16; // [T] signed char const VT_UI1 = 17; // [T] unsigned char const VT_UI2 = 18; // [T] unsigned short const VT_UI4 = 19; // [T] unsigned short const VT_I8 = 20; // [T][P] signed 64-bit int const VT_UI8 = 21; // [T] unsigned 64-bit int const VT_INT = 22; // [T] signed machine int const VT_UINT = 23; // [T] unsigned machine int const VT_VOID = 24; // [T] C style void const VT_HRESULT = 25; // [T] const VT_PTR = 26; // [T] pointer type const VT_SAFEARRAY = 27; // [T] use VT_ARRAY in VARIANT const VT_CARRAY = 28; // [T] C style array const VT_USERDEFINED = 29; // [T] user defined type const VT_LPSTR = 30; // [T][P] null terminated string const VT_LPWSTR = 31; // [T][P] wide null terminated string const VT_FILETIME = 64; // [P] FILETIME const VT_BLOB = 65; // [P] Length prefixed bytes const VT_STREAM = 66; // [P] Name of the stream follows const VT_STORAGE = 67; // [P] Name of the storage follows const VT_STREAMED_OBJECT = 68; // [P] Stream contains an object const VT_STORED_OBJECT = 69; // [P] Storage contains an object const VT_BLOB_OBJECT = 70; // [P] Blob contains an object const VT_CF = 71; // [P] Clipboard format const VT_CLSID = 72; // [P] A Class ID const VT_VECTOR = 4096; // $1000 [P] simple counted array const VT_ARRAY = 8192; // $2000 [V] SAFEARRAY* const VT_BYREF = 16384; // $4000 [V] const VT_RESERVED = 32768; // $8000 const VT_ILLEGAL = 65535; // $ffff const VT_ILLEGALMASKED = 4095; // $0fff const VT_TYPEMASK = 4095; // $0fff
Пример:
var v : variant; v := longint(10); if( vType(v) = VT_I4 ) ...
Версия: Атлантис 5.0.1.