Board index » delphi » Dynamic Constant Arrays
Wayne Fulcher
Delphi Developer |
Dynamic Constant Arrays2004-12-10 07:23:13 AM delphi11 Please excuse me, but it has been years since I have needed to use the newsgroup and I can't find the "general" group to post this question in. Can someone either help me with my question below or point me somewhere I might can get help? I have been successful at defining a multi-dimensional constant array. But now I have a situation where the inner array may vary in number of elements needed for each out array entry. I can't figure out how to define a multi-dimensional dynamic constant array. Can anyone give me an example? Here is a sample of what I want to do. ---------- type TInnerDataRecord = record SomeOtherField1: String ; SomeOtherField2: String ; end ; TaInnerData = array of TInnerDataRecord ; TOuterDataRecord = record SomeField: Integer ; aInnerData: TaStateData end ; TaOuterData = array[1..2] of TOuterDataRecord ; const aMyData: TaOuterData = ( ( SomeField: 12; aInnerData: ((SomeOtherField1: 'Data1'; SomeOtherField2: 'Data2'), (SomeOtherField1: 'Data3'; SomeOtherField2: 'Data4')); ), ( SomeField: 64; aInnerData: ((SomeOtherField1: 'Data5'; SomeOtherField2: 'Data6'));) ( SomeField: 75; aInnerData: ((SomeOtherField1: 'Data7'; SomeOtherField2: 'Data8'));) ) ; ---------- Thanks for any help you can give me... Wayne |