-
Adding 2 Arrays!
I am reading the contents of 2 different text files in 2 different array variables. How do I combine the contents of the 2 array variables in one single array variable?
Or better still, how do I combine the contents of 2 text files & then load them in an array variable? Please note that I wouldn't prefer creating a third text file & populating the contents of the first 2 text files in the third text file.
-
Re: Adding 2 Arrays!
Are the two files in the same format? Then (pseudocode):
initialize the array pointer
Open the first file
Call the read-into-array routine with the first file number
Close the first file
Open the second file
Call the read-into-array routine with the second file number
Close the second file
Read-into-array routine
while not eof(file)
read a line
put it into the array
increment the array counter
wend
-
Re: Adding 2 Arrays!
Combining two arrays:
Array3 = Split(Join(Array1,Delimiter) & Delimiter & Join(Array2, Delimiter),Delimiter)