A
awfigsk
Unregistered / Unconfirmed
GUEST, unregistred user!
var
TITypeInfo;
TDTypeData;
EnumName:string;
begin
TI:=AClass.ClassInfo;
TD:=GetTypeData(TI);
with AStrings do
begin
Add(Format('Class Name: %s',[TI.Name]));
EnumName:=GetEnumName(TypeInfo(TTypeKind),Integer(TI.Kind));
Add(Format('Kind: %s',[EnumName]));
Add(Format('Size: %d',[AClass.InstanceSize]));
Add(Format('Defined in: %s.pas',[TD.UnitName]));
Add(Format('Num Propertieds: %d',[TD.PropCount]));
end;
end;
在这几个Add语句中为什么这些参数都要加中括号?不是集合类型才加吗?
TITypeInfo;
TDTypeData;
EnumName:string;
begin
TI:=AClass.ClassInfo;
TD:=GetTypeData(TI);
with AStrings do
begin
Add(Format('Class Name: %s',[TI.Name]));
EnumName:=GetEnumName(TypeInfo(TTypeKind),Integer(TI.Kind));
Add(Format('Kind: %s',[EnumName]));
Add(Format('Size: %d',[AClass.InstanceSize]));
Add(Format('Defined in: %s.pas',[TD.UnitName]));
Add(Format('Num Propertieds: %d',[TD.PropCount]));
end;
end;
在这几个Add语句中为什么这些参数都要加中括号?不是集合类型才加吗?