[英]How do I work with an array of type (TList, class) with Delphi7
I have an old programm with a variable: 我有一个带有变量的旧程序:
Modul : array[1..4] of array[0..5] of array[1..3] of TModul;
I can store modules in a list: 我可以将模块存储在列表中:
procedure Test;
var
List: TList;
PModul: Pointer;
begin
PModul := Addr(Modul);
List:= TList.Create;
List.Add(PModul);
//...
List.Free;
end;
but how can I read an element from the list 但是我如何从列表中读取元素
? := Modul[x,y,z].MeasValue.Value[i];
from the list? 从清单上?
And how can I pass the modul into function/procedure like this: 以及如何将模块传递给函数/过程,如下所示:
TTest=class(TObject)
private
FModul: TModul;
function GetModul: TModul;
procedure SetModul(const Value: TModul); // it isnt't work
public
property Modul: TModul read GetModul write SetModul;
end;
so that I can work with my modul and TObjectList? 这样我就可以使用我的modul和TObjectList?
Thanks in advance. 提前致谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.