Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check if Function/Procedure exists
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00792369
Message ID:
00792376
Vues:
13
>I want to get the data from the table and call that function. I would like to put in a validation to check that the specified function exists before I call it, if possible.

If you're using VFP 8, you could wrap it up in a Try Catch block, as in:
try 
   *-- run your code
catch
   *-- Handle the error for a non-existent function.
endtry 
if you're using prior versions of VFP, you'd have to handle that by means of an Error method of an object, or an ON ERROR routine.

However, I'd suggest that instead of running functions, you should rather run methods, so that you could use the PEMSTATUS() functions in order to determine whether the given method is available or not.

HTH
Claudio Lassala
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform