读书人

Delphi declaring a constant array o

发布时间: 2012-11-05 09:35:12 作者: rapoo

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),
??);

读书人网 >.NET

热点推荐