Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to check if function exists?
Message
From
27/05/2021 14:56:39
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01680784
Message ID:
01680799
Views:
35
>>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform