>>>>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).
I ended up with the following code:
cPath = GetGlobal(2)
If !type("cPath") = "C"
cPath = pcExePath
endif
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham