0

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. later i want the first value of array will caompre to table name so that query may run and the second value of array will compare to combox for some purpose how i want like it .
array[0..3] of Record = (
(string0, integer0)
(string1, integer1)
(string2, integer2)
(string3, integer3)
); in delphi

Edited by Ali Musa

3
Contributors
5
Replies
49
Views
4 Years
Discussion Span
Last Post by House_of_Dexter
1
TRow = record
    Column1: string;
    Column2: Integer;
end;

TArray = array [0..3] of TRow;
Votes + Comments
Brilliantly eligant
0

sir then how to assign value to TArray value like 'abc' 002, 'def' 003, etc plz give me a complete example.

Edited by Ali Musa

0

You can use a StringList...

StringList.AddObject(string0, Pointer(integer0));

The string can be accesssed as StringList.Strings[a_Index];
the integer can be accesssed as integer(StringList.Objects[a_Index])

Edited by House_of_Dexter

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.