Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Complicated algorithm - could not figure this out by mys
Message
De
15/07/2002 16:14:02
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00678774
Message ID:
00678833
Vues:
21
Hello Nadya,

I noticed you fixed one problem...you moved the following to the bottom of the inner loop:
if eof()
    exit
endif
skip && New record in inner loop
However, the SKIP should be first. You are already on a record (you are processing one), eof() won't occur until you issue a SKIP while sitting on the last record.

Also, the inner loop processes appears to process more than one record that have the same address. When the last record of a given record is processed, you do something that relates to a sale without a mortgage. Then you do another skip, in the outer loop. Does this cause some records to not be processed? IOW, there are some records that would never see the top of the loop.

How do you ensure the addresses are typed the same way? Is it possible that there are two entries with the same physical address, that are entered slightly differently? Such as '1111 Oak Drive', and '1111 Oak Dr.' on the next record.

Another point, since you are not doing a SCAN/ENDSCAN, it would seem safer to me if you are more explicit with your work areas, just in case the work area gets changed. For example:
do while not eof('Srce')
...
    skip 1 in Srce
enddo
>Here is my new code. Does anybody see problems?
< SNIP >
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform