B
BeCalm
Unregistered / Unconfirmed
GUEST, unregistred user!
[?]请看代码:我认为这个函数永远返回False;原因是:Temp <> Name在i=0时永远成立,这样的话要这个函数有什么用处,希望高手解答???????
class function TObject.ClassNameIs(const Name: string): Boolean;
var
Temp: ShortString;
I: Byte;
begin
Result := False;
Temp := ClassName;
for I := 0 to Byte(Temp[0]) do
if Temp <> Name then Exit;
Result := True;
end;
class function TObject.ClassNameIs(const Name: string): Boolean;
var
Temp: ShortString;
I: Byte;
begin
Result := False;
Temp := ClassName;
for I := 0 to Byte(Temp[0]) do
if Temp <> Name then Exit;
Result := True;
end;