Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Puzzling Comparison
Message
From
23/06/2020 19:35:09
 
 
To
23/06/2020 19:22:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01674994
Message ID:
01675006
Views:
81
Likes (1)
>At my wits end!

Wrap the comparison around a function that logs what each value is:
* 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 tcVar
Afterward, 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.
Previous
Reply
Map
View

Click here to load this message in the networking platform