>Is it possible to find out if a variable exists or
>it isn't store to memory at all?
>For example, if I put only one line in a program:
>
>wait window MyVar
>
>program reports an error that variable MyVar wasn't found,
>so if I could make something like this
>
>if VarExist("MyVar")
> wait window MyVar
>endif
>
>would be helpful for me.
>
>Thanks, Zlatko.
IF TYPE ("MyVar") <> "U"
WAIT WINDOW TRANSFORM (MyVar)
ENDIF
TYPE won't break whatever you feed it. Remember to include the quotes around the variable name as TYPE essentially does an EVALUATE first.
If you're using VFP 6.0+, the TRANSFORM function, with only one parameter, will convert the variable to a string which is compatible with the WAIT WINDOW format.
Enjoy!
Jay