Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Re-try with TRY/CATCH
Message
De
16/12/2008 16:25:50
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
16/12/2008 06:42:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01367724
Message ID:
01367956
Vues:
9
>>Good point about no error! I forgot about it. I guess I need to add some extra check in FINALLY clause for this too.
>>
>>I don't like EXIT in principle :)
>
>I have heard this from other people, but I really don't understand why not. Exit is a valid command, which often can be very handy.
>
>The same goes for programmers who insists that you shall never have more than one Return within a function. Personally I used to follow this rule, but I have changed my mind. I now often have some early returns, usually after parameter and environment checking, to return error values, and one late return with the real return value. I always avoid "intermediate returns".

That's pretty much the same rule as in some other areas of life: either just test the waters, or swim to the other end. Very impractical to bail out in the middle of it, even when feasible. And in some situations, may be taken as very rude, too. All the more reason to agree with you on this.

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