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:
Stop or return?
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:
01159807
Vues:
62
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)

Hope this makes sense, thanks in advance.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform