枚举类型的遍历

for m := Low(类型) to High(类型)   do     即可;


举例:


Uses TypInfo;

Type

TMyEnum = (Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday);

var

m: TMyEnum;

begin

  for m := Low(TMyenum) to High(TMyenum) do

    mmo1.Lines.Add( IntToStr(Ord(m)) + ' = ' +

      TypInfo.GetEnumName(TypeInfo(TmyEnum),Ord(m)));

end;



联系电话:
020-00000000
联系电话:
020-00000000
联系电话:
020-12345678