str := self.ClassName;
strCopy(info, PChar(str));
end;
result := 3;
end;
{ ----- 利用Inc文件实现 ----- }
function TCar.Run(info: pchar): integer;
var
str: string;
begin
if info <> nil then
begin
str := self.ClassName;
strCopy(info, PChar(str));
end;
result := 4;
end;
end.
[参考文献]:
1. Delphi面向对象编程思想,第8章,刘艺, 2003.9, 机械工业出版社.
2. Delphi 6 Developer‘s Guide, p209, Steve Teixeira, SAMS, 2001.