Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check if function exists?
Message
De
27/05/2021 14:56:39
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01680784
Message ID:
01680799
Vues:
36
>>>Please let me know if the above is not correct.
>>
>>Aha, just "some other check", like I said in reply to Tamar.
>
>The problem (my problem) was that I was testing this function, GetGlobal(2) so much at the top of the application where the SET PROCEDURE was not yet declared. and the error code was that program GetGlobal.prg didn't exist.

You'd get that in IDE, when "available" is "is mentioned on the stack or in set procedure". In an exe, whatever is in the project, exists. So you'd not get that result in runtime, and would have to go back to thinking it over.

Yup, the test as it is now is more to the point - you are testing for a real clue as to whether the thing was set or not, i.e. the thing itself. The "do I have this function" test is obviously giving you wrong results (nonexistent before set procedure in IDE, always existent in exe).

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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform