Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return statements within the with endwith blocks
Message
De
07/01/2017 09:47:02
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
06/01/2017 16:56:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01646361
Message ID:
01646385
Vues:
60
>>>Thanks, Tore. Perhaps this may be one of the problems here, which we may want to eliminate. Although it's a bit tricky given that lengthy code.
>>
>>I hope you use Thor? One of the Thor tools will give you a list of the places where you have a Return within a With-Endwith construct. It can even fix it for you.
>
>"Fix it for you"? Since multiple RETURNs is one sign of spaghetti logic, how can Thor "fix" it in the general case?

I guess it would create a local variable, set it to .t., then wrap the rest of the with-endwith block in if ThisLocalVar...endif, then the rest of the code in the procedure in another such if-endif block... and so on until out of any if, scan, for and other blocks/loops, so the code swims out executing nothing else.

If there's spaghetti in there before this is done, it would now also have sticky stringy cheese too.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform