Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Puzzling Comparison
Message
De
23/06/2020 19:35:09
 
 
À
23/06/2020 19:22:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01674994
Message ID:
01675006
Vues:
82
J'aime (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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform