Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to check for not defined variable
Message
 
To
12/04/2007 21:48:23
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01215370
Message ID:
01219011
Views:
10
>Hi,
>If a variable not defined in runtime, it will cause an error during
>runtime.
>How to check a variable not defined in runtime ?
>
>Thanks.

Check TYPE() function in HELP.
IF TYPE([m.SomeUndefinedVariable]) # [U]
   ? [Variable is undefined. The type is ]+TYPE([m.SomeUndefinedVariable])
ELSE
   ? [Variable is defined. The type is ]+TYPE([m.SomeUndefinedVariable])
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform