How TCL works



How TCL works..

Answer / pranab

How TCL works..
---------------
After TCL installed on the machine, TCL information got
registred in the machine.
e.g:In Windows Registry
[HKEY_LOCAL_MACHINE\SOFTWARE\ActiveState\ActiveTcl]

The TCL path is updated in Machine environment.
e.g:
PATH=C:/Tcl/bin;%PATH%

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.
#tclsh
%

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
message.

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


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

set say "Hello"
puts $say

Execute:
#tclsh HelloTickle.tcl
Hello

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.

-----

Is This Answer Correct ?    10 Yes 2 No

Post New Answer

More Tcl Interview Questions

Which scripting language is better among TCL Perl and Python and why? 

1 Answers   GE,


How to get the next ip for given ip ex: 10.10.10.1 -> 10.10.10.2 ex: 10.10.10.255 -> 10.10.11.0

5 Answers   Cisco, HCL,


write a program to the given ip is valid private address or not(192.168.1.1)?

4 Answers   HCL,


How do you check whether a string is palindrome or not using TCL script?

10 Answers  


How to run a package in tcl

2 Answers  






How to Swap 30 & 40 in IP address 192.30.40.1 using TCL script?

8 Answers   HCL, ONGC,


Set ip address as 10.30.20.1 write a script to replace the 30 with 40 ?

9 Answers  


how to increment eacl element in a list ? eg: incrlist {1 2 3} =>2 3 4

9 Answers   Honeywell,


Where can find the sample tcl programs?

3 Answers  


How do you find the length of a string without using string length command in TCL??

6 Answers   Hexaware,


 write a regular expressions to fetch all the valid ip's

3 Answers   Alcatel,


{Anu Anudeep Anukumar Amar Amaravathi Aruna} is their any possibility to find the letter "a"in the given list? if yes how?

3 Answers   Cisco, HCL,


Categories