There are probably more elegant ways but I use set and catch. Let's say you want to know if a variable, a, has a value. A statement, set a will return the value if it exists, or an error if it doesn't. You can catch the error: catch {set a} and that returns a 0 if there is no error and 1 if there is. So, for example:
if [catch {set a}] {
#there was an error; a is not set
} else {
#there was no error; a has a value
}
_________________
Bob Rashkin
rrashkin@csc.com