TCL (Tool Command Language) Question:
Download Questions PDF

How TCL works?


After TCL installed on the machine, TCL information got
registred in the machine.
e.g:In Windows Registry

The TCL path is updated in Machine environment.

Then TCL starts working.

1.TCL a Scripting Language. TCL binary comes with
name "tclsh".
When we use TCL,[ For example from Command prompt/Terminal
try to run tclsh ] it provides default prompt "%" to User
and asks for input.

How TCL works??
Each input from user is treated as TCL command.
After providing the command, tclsh fetch(gets) that command
and try to validate/compile/execute and populate(puts) the

% hello
invalid command name "hello"
% set
wrong # args: should be "set varName ?newValue?"
%set say "Hello"

2. When we use TCL, we can provide a Script file as
Example: Create a file "HelloTickle.tcl" containing:

set say "Hello"
puts $say

#tclsh HelloTickle.tcl

How TCL works??
Tcl takes the Argument as a file and try to read the file.
TCL stores the file in memory and reads the file Line by
Line and try to validate/compile.
TCL provides the output and release the memory.


Download TCL Interview Questions And Answers PDF

Previous QuestionNext Question
What is TCL?how to increment eacl element in a list?
eg: incrlist {1 2 3}
=>2 3 4