Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another Difference Between Type() and VarType()
Message
From
19/01/1999 13:31:45
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00177477
Message ID:
00177684
Views:
40
>This is because i don't think that Albert understands how TYPE() works; TYPE() takes the character expression it is passed, evaluates it, and returns the type of the evaluated expression. I'd expect TYPE('TRANSFORM(I)') == VARTYPE(TRANSFORM(I)), since TYPE('TRANSFORM(I)') evaluates the string TO "TRANSFORM(I))", gets the result of TRANSFORM(I), "4.5", , and checks it's type, while TYPE(TRANFORM(I)) evaluates the result of the function, "4.5", gets the result of 4.5, and checks it's type.

Actually I DO know. It was late when I posted and I didn't notice the missing quotes.

>
>IOW, TYPE() and VARTYPE() operate exactly as designed and expected.

I didn't say anything about not working as designed. I have no problem with how they work, I was just pointing out a difference.
Previous
Reply
Map
View

Click here to load this message in the networking platform