Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One exit per procedure/function/codeblock to what purpos
Message
De
08/10/2003 19:43:19
 
 
À
08/10/2003 19:21:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00835552
Message ID:
00836584
Vues:
20
>>- Final trick question: do you support the use of LOOP in DO...ENDDO?
>
>Yes, I use LOOP and EXIT frequently in DO WHILE, SCAN, FOR, etc. They wouldn't be in the language if they weren't meant to be used. For the same reason that a "GO TO" (code line) is NOT in the language.
>I've never used RETURN TO..., which I guess comes close to a GO TO.

I've even used goto in a C program (once) to get to the bottom (single exit point) out of a complex function from somewhere in the middle of some hairy logic. Kept me from having to have all kinds of conditional flags in the logic muddying things in order to get to the exit code gracefully.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform