Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Do I
Message
From
28/01/1999 13:12:35
 
 
To
28/01/1999 13:05:56
Jonathan Cochran
Alion Science and Technology
Maryland, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00180248
Message ID:
00181432
Views:
11
>In VFP 6, you can use the VARTYPE() function. It will return "O" for an object, and "X" for a .NULL. value.

If the variable doesn't exist, VATYPE() smokes with a Variable "whatever" not found, so if the variable might not exist, or might be out of scope, TYPE() is still preferable.

>
>>Walter,
>>
>>I'm not sure you see the point:
>>
>>create cursor temp ( iID i, cFirstName c(40))
>>insert into temp values ( 0, "Walter" )
>>scatter name oRow
>>
>>? type( "oRow.Name" ) && U
>>? type( "oRow.cFirstName" ) && C
>>? type( "oRow" ) && O
>>
>>oRwo is indeed an object, it has no .Name property to test
>>
>>FWIW my IsObject() udf is:
>>
>>lparameter roObject
>>
>>return( ( type( "m.roObject" ) == 'O' ) and ( ! isnull( m.roObject ) ) )
>>
>>
>>>Sure, but then you would use something like TYPE("Table.fields")=cType
>>>I was only purposing anotherway for
>>>
>>>lExist=TYPE("oObject") AND !ISNULL(oObject)
>>>
>>>to determine if a object exists.
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
Next
Reply
Map
View

Click here to load this message in the networking platform