如何得到枚举类型内容的长度,如 tGetData(gdInteger,gdFloat) 得到 结果 2? 用Low和High配合循环就可以了: type TEumType=(eTest1,eTest2); var i:TEumType; R:integer; begin R:=0; for i:=Low(i) to High(i) do inc(R); end; 其中R就是结果了。此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/67920.html