Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check if function exists?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01680784
Message ID:
01680797
Vues:
34
>>Good point. The procedure GetGlobal() does exist. But the value returned from GetGlobal(2) is .F. when the array which is used to get the value is not yet defined. And once the array is defined, then GetGlobal(2) returns the folder name. So, what I did with the Dragan's suggestion is as follows:
>>
>>if type("GetGlobal(2)") = "C"
>>   *--  Array is define and GetGlobal(2) returns a valid folder name
>>else
>>   *-- Array is not yet define and GetGlobal(2) SHOULD NOT be used
>>endif 
>>
>>
>>Please let me know if the above is not correct.
>>
>>Thank you.
>
>Array is defined / not yet defined.
>
>Sorry, could not resist :)

Your English is perfect :)
"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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform