I don't know. I was using both. In a current project, because VARTYPE was obviously missing the mark, I changed all VARTYPE functions to TYPE.
About the test for a character value. I don't recall why, but I vette for OCX nodes by evaluating for a character key:
?TYPE('oform.ocxTreeView.Nodes(lcNodeKey).key')=="C"
?TYPE('oform.ocxTreeView.Nodes(lcNodeKey)')=="O"
VARTYPE does not always work as expected. In the case you present, it may. But I have to throw in the towel and trust in TYPE:).
>
>Are you saying that VARTYPE is okay when:
>VARTYPE(MyForm.Name)==[C]?
>>
>I say this:
>if
>- VARTYPE(m.MyForm)=="O"
>and
>- m.MyForm is a reference to a VFP object
>and
>- the object m.MyForm have the property Name
>then
>- VARTYPE(m.MyForm.Name)==[C] is usable and return a okay value.
>
>Until now, I have not found a adverse proof.
>
>But:
>if
>- you use VARTYPE(MyForm.Name)
>and
>- exist ALIAS(nn)='MyForm'
>and
>- not exist a FIELD(mm,'MyForm')=='Name'
>then
>- VARTYPE not return "U", but fire a error ( it is a bug ).
>
>Fabio
Imagination is more important than knowledge