isdef

isdef — check variable existence

Calling sequence

isdef(name [,where])  

Parameters

name : a character string
where : an optional character string with default value 'all'

Description

isdef(name) returns %T if the variable 'var-name' exists and %F otherwise.

isdef(name,'local') returns %T if the variable 'var-name' exists in the local environment of the current function and %F otherwise.

Examples



A=1;
isdef('A')
clear A
isdef('A')
 
  

See also

exists, whereis, type, typeof, clear