07-03-2025, 04:44 PM
Read the whole file once inside a two dimensional array.
That's now got all your data read and into your array. You don't have to worry with the slowness of the file reading any more. Now you just process it.
Code: (Select All)
FOR i = 1 to 4500 'number of lines in the file... replace with a DO LOOP if necessary
FOR j = 1 to 10
INPUT #1, data_array(i,j)
NEXT j, iThat's now got all your data read and into your array. You don't have to worry with the slowness of the file reading any more. Now you just process it.
Code: (Select All)
FOR i = 1 to 4500 - 7 'going to compare the next 7 lines of data
FOR j = 1 to 7 'the 7 lines we're going to compare
FOR k = 1 to 10 'the 10 data elements that we need to compare in the first line of data
FOR l = 1 to 10 'the 10 data elements that we need to compare
IF data_array(i,k) = data_array(i+j,l) THEN 'we have a match
NEXT
NEXT
NEXT
NEXT

