Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stop or return?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01159807
Message ID:
01159992
Vues:
14
Hi David.

>I've got a little function that if it fails I want it to stop and not continue on with the rest of the program. And I'm trying to figure out if "return" is appropriate or a try and catch block. Code:
>
>if sqlrun(lc_cmd) = "Fail"
>return
>else
>anotherfuntion(lcResult)
>endif
>
>or
>
>try
>
>sqlrun(lc_cmd)
>
>catch
>
>return
>
>end
>
>anotherfunction(lcReuslt)

To add to Fabio's comment, you can't use RETURN inside a TRY structure.

Doug
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform