Information générale
Catégorie:
Codage, syntaxe et commandes
Donald,
Sad to hear that it is documented like it is, given that some FPA article *did* mention the behaviour you got.
I must admit that when I read that in FPA I thought that having *any* command/function error-out was not at all the best design. So hopefully what had been documented will some day come to pass
Cheers,
Jim N
>>>Am I missing something here?
>>>
>>>Using VFP6.0...
>>>
>>>I have a method that instantiates my forms. In this method, I check to see if the form was, indeed, instantiated. If not, I do not increment my forms array.
>>>
>>>I was using vartype(myform). If the form was instantiated, vartype() returns 'O', as it should, it errors if the form was not instantiated as opposed to returning 'U'. If I use type(), in this case, I get the expected behavior.
>>>
>>>What gives?
>>
>>You should also check for .NULL.:
>>if type("this.aformarray[n]")<>"O" and not isnull(this.aformarray[n])
>
>Thanks Ed,
>
>I normally do check for .NULL. when using type() but vartype() takes a lNullDataType argument that will return 'X' if it is .NULL.
>
>I am trying to figure out why it is doesn't behave like it is documented to. It says that vartype() will return 'U' if a var doesn't exist. But so far, I am getting an error.
>
>I would hate to get bit later on, by using a function and it doesn't work, ya know.
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