Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Complicated algorithm - could not figure this out by mys
Message
 
 
À
16/07/2002 15:11:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00678774
Message ID:
00679316
Vues:
34
Hi Steve,

I was going to update my message, but you replied :) Anyway, I found another problem, so I changed the algorithm again. Basically, all variables are now set outside the check for address. I tested the result and it appears to be correct now.

I will work on the user's interface. I guess, I have to show resulting table in the upper grid and source table (related by recnum) in the lower grid and may be additional grid for source, but without relation. I would need to have ability to Link/Un-Link records (haven't figured this part yet in my mind).

I agree with your general note about breaking code on smaller pieces, however, in this particular case the program is quite small and could not be easily broken.

I do process the first record, BTW. I'll send you the latest version of program by e-mail, would appreciate, if you can find some time to test it tomorrow.

Thanks again for your help.

>Nadya,
>
>I wish I had time to look at it deeper right now, but I don't. I appears the first record won't get processed like a new address, because you have this before the loop:
>
>lcAddress = upper(Srce.City+Srce.Address+Srce.LotUnit)
>
>You should have this instead (you have it commented out above that point)
>
>lcAddress = replicate('Z',40) && upper(Srce.City+Srce.Address+Srce.LotUnit)
>
>And I don't mean to nit-pick *grin*, but I think it would be more manageable if some of the code was broken into separate procedures. I like for each individual procedure come as close to fitting on a screen or a single piece of paper as possible. Make sure the outer procedure, with the loop and address check, work properly, and calling functions to do the bulk of the work. Then you don't have to mess with the main procedure anymore.
>
>>Hi Steve,
>>
>>It looks like I almost solved the problem. I just noticed a problem with Geo index, though.
>>
>>It's current expression is
>>UPPER(CITY+ADDRESS+LOTUNIT+DOCTYPE+ ;
>>STR(MORTGAGE,10)+DOCKETREF+STR(BOOK,5)+STR(PAGE,4))
>>
>>But it should be something like STR(9999999999-MORTGAGE,10) instead, because I want larger mortgages to go first (with sales record) and "piggy back" mortgages should create a new record.
>>
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform