tcl Printing the value of a variable


Example

In order to print the value of a variable such as,

set tempVar "This is a string."

The argument in the puts statement is preceded by a $ sign, which tells Tcl to use the value of the variable.

% set tempVar "This is a string."
This is a string.
% puts $tempVar
This is a string.