function GetEnumName(TypeInfo: PTypeInfo
Value: Integer): string;
TMySet = 1..5;
TMysets=set of TMyset;
myset:TMysets:
myset:=[1,2,3];
for ms:=1 to 3 do
memo1.lines.add(GetEnumName(Typeinfo(Tmyset),integer(ms)));
[],
不过似乎这样没什么含义,可以试试这样用:
TMySet = (one,two,three,four,five);
TMysets=set of TMyset;
myset:TMysets;
myset:=[one,two,three];
for ms:=one to three do
memo1.lines.add(GetEnumName(Typeinfo(Tmyset),ord(ms)));