Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vartype(v)== type('v') ?
Message
From
03/01/1999 20:36:28
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00172278
Message ID:
00172298
Views:
33
>>I need to run VFP 6 FFC code in vfp5.
>>
>>I implemented a vartype() in the vfp 5:
>>
>>func VARTYPE
>>lpara prmVAR
>>return type('m.prmVAR')
>>
>>Is this exactly the same as vfp 6 built-in vartype function?
>
>For the most part yes. I did find one instance where vartype() returned an error where type() returned a "U". Hopefully Christof will chime in because I think he has done extensive testing of this new function.
>
>Either way, you definitely need some code changing to rename your UDF and all occurrences of calling it in your apps -- which, for now, may be the safest thing to do.

There's at least one significant difference - a null variable returns 'X' from vartype(), but the last type the variable had before it was assigned a null value from TYPE(). Also, if you pass an expression to vartype() with an illegal expression in it, it generates a VFP error appropriate to the illegal expression (syntax error, data type mismatch, etc.); TYPE() simply returns 'U'.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform