* Instead of: IF x = y * Use this: IF log_content(x, "x", .t.) = log_content(y, "y") * And create a function like this (untested, off the top of my head): FUNCTION log_content LPARAMETERS tcVar, tcIdentifier, tlAddCR LOCAL lnI, lcData lcData = IIF(tlAddCR, CHR(13), SPACE(0)) + tcIdentifier + " -- " + tcVar + " -- " FOR lnI = 1 TO LEN(tcVar) lcData = lcData + TRANSFORM(ASC(SUBSTR(tcVar, lnI))) + " " NEXT STRTOFILE(lcData, "log_comparison.txt", .T.) * Pass-thru RETURN tcVarAfterward, you will be able to compare the content of each pair of lines. You can use ALINES() to load it back in, and iterate through by 2 comparing i and i+1 against each other to see what values were there.