DIM t1!(40), t2!(40), t3%(40), t4%(40), t5!(40) DIM t6!(40), t7!(40), t8!(40), t9!(40), t10!(40) DIM s1!(40), s2!(40), s3%(40), s4%(40), s5!(40) DIM s6!(40), s7!(40), s8!(40), s9!(40), s10!(40) j% = 0 infile% = FREEFILE filein$ = "test.txt" OPEN filein$ FOR INPUT AS infile% LINE INPUT #infile%, tmpstr$ LINE INPUT #infile%, tmpstr$ LINE INPUT #infile%, tmpstr$ WHILE NOT EOF(infile%) j% = j% + 1 INPUT #infile%, t1!(j%), t2!(j%), t3%(j%), t4%(j%), t5!(j%), t6!(j%), t7!(j%), t8!(j%), t9!(j%), t10!(j%) 'PRINT t1!(j), t6!(j) WEND CLOSE infile% ttot% = j% j% = 0 infile% = FREEFILE filein$ = "retest.txt" OPEN filein$ FOR INPUT AS infile% LINE INPUT #infile%, tmpstr$ LINE INPUT #infile%, tmpstr$ LINE INPUT #infile%, tmpstr$ WHILE NOT EOF(infile%) j% = j% + 1 INPUT #infile%, s1!(j%), s2!(j%), s3%(j%), s4%(j%), s5!(j%), s6!(j%), s7!(j%), s8!(j%), s9!(j%), s10!(j%) 'PRINT s3%(j%), s6!(j%) WEND CLOSE infile% stot% = j% 'PRINT ttot%, stot% outfile% = FREEFILE fileout$ = "resum.txt" OPEN fileout$ FOR OUTPUT AS outfile% FOR i% = 1 TO ttot% FOR j% = 1 TO stot% IF (s3%(j%) = t3%(i%)) THEN PRINT USING "### ### ###.## ###.## #.##### #.#####"; s3%(j%); s4%(j%); s6!(j%); t6!(i%); s7!(j%); t7!(i%); PRINT USING " ##.##### ##.###"; ABS(s7!(j%) - t7!(i%)); 100 * ABS(s7!(j%) - t7!(i%)) / s7!(j%) PRINT #outfile%, USING "### ### ###.## ###.## #.##### #.#####"; s3%(j%); s4%(j%); s6!(j%); t6!(i%); s7!(j%); t7!(i%); PRINT #outfile%, USING " ##.##### ##.###"; ABS(s7!(j%) - t7!(i%)); 100 * ABS(s7!(j%) - t7!(i%)) / s7!(j%) END IF NEXT NEXT CLOSE outfile%