首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

Delphi declaring a constant array of records

2012-11-05 
Delphi declaring a constant array of records.type??TSampleEnumType (seNone, seONE, seTWO, seTHREE

Delphi declaring a constant array of records.


type
??TSampleEnumType = (seNone, seONE, seTWO, seTHREE, seFOUR);
??TSampleRecord = record
????SampEType: TSampleEnumType;
????iValue: integer;
??end;

const
??TConstArrayofRecord: array [0..4] TSampleRecord (
????(SampEType: seNONE; iValue: 0),
????(SampEType: seONE; iValue: 1),
????(SampEType: seTWO; iValue: 2),
????(SampEType: seTHREE; iValue: 3),
????(SampEType: seFOUR; iValue: 4),
??);

热点排行