参考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.

 

相关文章:

  • 2021-08-03
  • 2022-12-23
  • 2022-01-09
  • 2021-11-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
相关资源
相似解决方案