Board index » delphi » 2 dimensional array of string and integer
slycaper
![]() Delphi Developer |
2 dimensional array of string and integer2005-07-15 01:30:01 AM delphi65 Hi, I have, what I thought, was a trivial question however I am not quite sure of an answer yet. I'd like a two dimensional array of strings and integers. The first "column" will be string and the second "column" will be integer. I also thought about using a record to accomplish this but I am not sure about how to go about that either. I need a relationship between the string and integer in the columns. For instance I'd like to declare it like so... TMyRecord: record; col1: string; col2: integer; end; array[0..3] of TMyRecord = ( (string0, integer0) (string1, integer1) (string2, integer2) (string3, integer3) ); I know the syntax here is incorrect however I am not quite sure how to initialize the record. I'd prefer to initialize it this (above) way instead of this: TMyRecord: record; col1: (string0,string1,string2,string3); col2: (integer0,integer1,integer2,integer3); end; Maintaining the second method would be more difficult because of how they r declared. Thanks |