>I'd like to check if a variable exists. Can someone point me to the function for this?
>
>It would work just like FOUND(), returning a .t. if the var exists and .f. if it does not.
>
Try the TYPE() function; if given the name of a variable (or property, or field) as an ASCII string, it returns a single character designating the data type. An undefined name will return 'U'. So:
Var1 = 0
? 'Created'
IF TYPE('Var1') # 'U'
? 'The variable Var1 exists'
ELSE
? 'Var1 does not exist'
ENDIF
RELEASE Var1
? 'released'
IF TYPE('Var1') # 'U'
? 'The variable Var1 exists'
ELSE
? 'Var1 does not exist'
ENDIF