[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'System' (#rtl)

tvardata

Variant record.

Declaration

Source position: varianth.inc line 76

type tvardata = packed record

  vtype: tvartype;

  

Type of variant.

  case Integer of

    0: (

        res1: Word;

        case Integer of

          0: (

              res2: Word;

              res3: Word;

              case Word of

                varsmallint: (

                    vsmallint: SmallInt;

                  );

                varinteger: (

                    vinteger: LongInt;

                  );

                varsingle: (

                    vsingle: single;

                  );

                vardouble: (

                    vdouble: double;

                  );

                varcurrency: (

                    vcurrency: currency;

                  );

                vardate: (

                    vdate: TDateTime;

                  );

                varolestr: (

                    volestr: PWideChar;

                  );

                vardispatch: (

                    vdispatch: pointer;

                  );

                varerror: (

                    verror: HRESULT;

                  );

                varboolean: (

                    vboolean: wordbool;

                  );

                varunknown: (

                    vunknown: pointer;

                  );

                varshortint: (

                    vshortint: ShortInt;

                  );

                varbyte: (

                    vbyte: Byte;

                  );

                varword: (

                    vword: Word;

                  );

                varlongword: (

                    vlongword: DWord;

                  );

                varint64: (

                    vint64: Int64;

                  );

                varqword: (

                    vqword: qword;

                  );

                varword64: (

                    vword64: qword;

                  );

                varstring: (

                    vstring: pointer;

                  );

                varany: (

                    vany: pointer;

                  );

                vararray: (

                    varray: pvararray;

                  );

                varbyref: (

                    vpointer: pointer;

                  );

            );

          1: (

              vlongs: array [0..2] of LongInt;

            );

      );

    1: (

        vwords: array [0..6] of Word;

      );

    2: (

        vbytes: array [0..13] of Byte;

      );

end;

Description

TVarData is a record representation of a variant. It contains the internal structure of a variant and is handled by the various variant handling routines.