Jay,
If tcVariable = "5" it should return C.
If tcVariable = 5 it should return N.
I have solved the problem. If tcVariable is type C, I check to see if its contents are a valid variable, field or property name.
lcType = TYPE( 'tuValue' )
IF lcType = 'C' AND ( LEFT( tuValue, 1 ) = "_" OR ISALPHA( tuValue ) ) AND TYPE( tuValue ) # 'U'
lcType = TYPE( tuValue )
tuValue = EVAL( tuValue )
ENDIF
>>Jay,
>
>>If tcVariable = "5" then the following code will set lcType to N instead of C. It appears that TYPE tries to evaluate uMyVar then returns the type of the result.
>
>>Shane
>
>Precisely. What do you want it to return in this case?
>
> Jay
Shane Murdoch