fork download
  1. Uses TypInfo;
  2. Type TMyEnum = (meFirst, meSecond, meThird);
  3. Var I: TMyEnum;
  4. Begin
  5. For I in TMyEnum Do
  6. Begin
  7. Writeln(GetEnumName(TypeInfo(TMyEnum), ord(I)));
  8. End;
  9. End.
Success #stdin #stdout 0s 440KB
stdin
Standard input is empty
stdout
meFirst
meSecond
meThird