@HKJ, I can't get listVars() to produce a result. Have tried a number of variations. Possible regression. 
listVars() has output to console, this means the output is usually hidden, you need to run TC in debug mode and look at the console window.
On command line:
=var a="hello world"
=listVars(a)
On console output:
a={string}hello world
TC programming language do not have the concept of std out, it can return values to what called the program, but it cannot print stuff out. To get around that a few "debug" functions has output directly to console (That is hidden for normal program execution).
TC add some output functions that can print to log window or show a window with output, but that cannot be used on functions that already output to console.
That is also the reason for stuff like:
return1(displayVar(split(getVarList(1),"\n")));
the getVarList(1) returns a list of defined variables. It can be directly used like =getVarList(1) from the command line in TC, the above is for use inside device definitions.
the split() converts it to a array, this gives a better display.
the displayVar() opens a window with the contents.
the return1() secures that the line has a return value, i.e. when used places that requires a return value it will not crash.
You might also want to use the return1() with listVars(), if you use it inside a device definition, but because it has a build in output path, you do not need the other stuff.