问题描述
在 Lazarus/FPC wiki 中已经编写了从枚举器可以使用语法构造 for Element in Enumerator index Info do
(参见 https://wiki.freepascal.org/for-in_loop#Get_enumerator_Position_if_available)获取附加信息。我为我的班级制作了枚举器
TLittleTableEnumerator = class
private
Linkedobject: TLittleTable;
FCurrent: TLittleTableItem;
FCurrentIndex: TInt;
public
constructor Create(AObject: TLittleTable);
function MoveNext: Boolean;
property Current: TLittleTableItem read FCurrent;
property CurrentIndex: TInt read FCurrentIndex;
end;
当我在使用它时
for Element in AObject index I do begin
//Do smth
end;
编译器说ticker.pas(90,29) Fatal: Syntax error,"DO" expected but "identifier INDEX" found
我需要做什么?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)