ok here is what i am really doing.
i have a file from a customer which should really have been multiple files because the content needs to be processed in different ways.
i am reading the contents of the file into an array.
each line of the file is delimited. so i break this down and record it as a field in the array. for instance line 1 field 1 is arr[1,1]
line 1, field 2 is arr[1,2] etc
there are 33 fields per line and over 2000 lines.
i was planning to sort the array based on the particular field (field 3 in reality) then output the data to seperate files based on logic around the content of field 3.
thinking about it i guess i don't need to sort it as i could create the output files at the start, and as i read each line write it back out to the correct file based on the value of field 3.
ok - so i have a solution to get me through this particular problem, but is there a sort based solution? from the little i have read about arrays of array (a subject grey alien has on this forum) i wasn't quite sure if dreamoras suggestion would work (but then i am not sure i understand arrays of arrays properly, or at least it is different to what i expected)
regards
glenn
i have a file from a customer which should really have been multiple files because the content needs to be processed in different ways.
i am reading the contents of the file into an array.
each line of the file is delimited. so i break this down and record it as a field in the array. for instance line 1 field 1 is arr[1,1]
line 1, field 2 is arr[1,2] etc
there are 33 fields per line and over 2000 lines.
i was planning to sort the array based on the particular field (field 3 in reality) then output the data to seperate files based on logic around the content of field 3.
thinking about it i guess i don't need to sort it as i could create the output files at the start, and as i read each line write it back out to the correct file based on the value of field 3.
ok - so i have a solution to get me through this particular problem, but is there a sort based solution? from the little i have read about arrays of array (a subject grey alien has on this forum) i wasn't quite sure if dreamoras suggestion would work (but then i am not sure i understand arrays of arrays properly, or at least it is different to what i expected)
regards
glenn