Information générale
Catégorie:
Codage, syntaxe et commandes
>>Thanks Jim. I believe I read the article you mention. This is the FPA we got at DevCon. I shall be looking this over again.
>
>I read this when it came out, and then was surprised when I COULDN'T generate an error using VARTYPE, I just get 'U' as one might hope to. How did you get an error out of it?
It seems to behave properly when using a variable. (sometimes) I was checking for form instantiation, which shouldn't be any different.
Here is a code snippet from my method:
do form (lcFileName) name .aForms[.nFormCount] linked noshow
**-- Test to see if the form is actually instantiated /DAO/
*
if vartype(.aForms[.nFormCount]) != 'O'
return(.F.) && No form
endif
If the form exists, everything is fine, if not, and the array index is undefined, it errors out whereas, type() used in the same manner, behaves properly.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement