B
Bright
Unregistered / Unconfirmed
GUEST, unregistred user!
1:
程序如下:
TSomeClass = class;
TSomeClass = class(TObject)
public
Value: Integer;
function SomeFunc(AClass: TSomeClass);
end;
function TSomeClass.SomeFunc(AClass: TSomeClass)
var
Value: Integer;
begin
with AClass do begin
// 如何在此处访问函数的局部变量Value?
end;
end;
2:
程序如下:
TClassOne = class(TObject)
private
FItem: Pointer;
public
property Item: Pointer read FItem write FItem;
end;
TClassTwo = class(TClassOne)
private
function GetItem: TObject;
public
property Item: TObject read GetItem;
end;
如何在TClassTwo中访问TClassOne的Item(Pointer)属性?
程序如下:
TSomeClass = class;
TSomeClass = class(TObject)
public
Value: Integer;
function SomeFunc(AClass: TSomeClass);
end;
function TSomeClass.SomeFunc(AClass: TSomeClass)
var
Value: Integer;
begin
with AClass do begin
// 如何在此处访问函数的局部变量Value?
end;
end;
2:
程序如下:
TClassOne = class(TObject)
private
FItem: Pointer;
public
property Item: Pointer read FItem write FItem;
end;
TClassTwo = class(TClassOne)
private
function GetItem: TObject;
public
property Item: TObject read GetItem;
end;
如何在TClassTwo中访问TClassOne的Item(Pointer)属性?