L
laibao
Unregistered / Unconfirmed
GUEST, unregistred user!
TVarRec 记录类型结构如下:
type
TVarRec = record
case Byte of
vtInteger: (VInteger: Integer; VType: Byte);//就是括号里面的是什么意思?
vtBoolean: (VBoolean: Boolean);//vtBoolen前面的vt是什么意思?
vtChar: (VChar: Char);
vtExtended: (VExtended: PExtended);
vtString: (VString: PShortString);
vtPointer: (VPointer: Pointer);
vtPChar: (VPChar: PChar);
vtObject: (VObject: TObject);
vtClass: (VClass: TClass);
vtWideChar: (VWideChar: WideChar);
vtPWideChar: (VPWideChar: PWideChar);
vtAnsiString: (VAnsiString: Pointer);
vtCurrency: (VCurrency: PCurrency);
vtVariant: (VVariant: PVariant);
vtInterface: (VInterface: Pointer);
end;
每种记录都有一个VType 域,乍一看不容易发现,因为它与实际意义的整型类型数据(通常是一个引用或一个指针)放在一起,只被声明了一次。(这句话里的VType域是什么意思?)
type
TVarRec = record
case Byte of
vtInteger: (VInteger: Integer; VType: Byte);//就是括号里面的是什么意思?
vtBoolean: (VBoolean: Boolean);//vtBoolen前面的vt是什么意思?
vtChar: (VChar: Char);
vtExtended: (VExtended: PExtended);
vtString: (VString: PShortString);
vtPointer: (VPointer: Pointer);
vtPChar: (VPChar: PChar);
vtObject: (VObject: TObject);
vtClass: (VClass: TClass);
vtWideChar: (VWideChar: WideChar);
vtPWideChar: (VPWideChar: PWideChar);
vtAnsiString: (VAnsiString: Pointer);
vtCurrency: (VCurrency: PCurrency);
vtVariant: (VVariant: PVariant);
vtInterface: (VInterface: Pointer);
end;
每种记录都有一个VType 域,乍一看不容易发现,因为它与实际意义的整型类型数据(通常是一个引用或一个指针)放在一起,只被声明了一次。(这句话里的VType域是什么意思?)