June 3rd, 2004, 01:52 AM
Join Date: Jun 2004
Time spent in forums: < 1 sec
Reputation Power: 0
comparing data in an array
Hi I have a csv containing postcodes like this:
I have loaded these values into an array like so.
i : integer;
s : string;
my_postcodes := TStringList.Create;
while not eof(myfile) do
my_postcodes.DelimitedText := line;
for i := 0 to my_postcodes.Count - 1 do
s := my_postcodes.Strings[i];
s := my_postcodes[i]; // Same as previous line
Does anyone know how I can choose a certain field from the array i.e. If i want to know the postcode for perth, how do I extract that information from the array and put it into a variable. I am really stuck!! Any help appreciated.