参考1:http://www.cnblogs.com/del/archive/2008/01/09/1031196.html
参考2:http://blog.csdn.net/qustdong/article/details/9230743
program Project1; {$APPTYPE CONSOLE} uses SysUtils,Windows,Dialogs; type Tnum = (One, Two ,Three); var s:string; TestArr : array[Tnum] of string = ('yi','er','san'); Number:Tnum; begin writeln(IntToStr(Ord(Two))); for Number := Low(Tnum) to High(Tnum) do Writeln(TestArr[Two]); Readln; Number := Two; Outputdebugstring('debug'); // Windows showmessage(TestArr[One]); //Dialogs ShowMessage(TestArr[Number]); end.