Home

Home > Tcl Introduction

Overview

TCL(Tool Command Language)is an Scripting Language. Tcl provides basic language features such as variables, procedures, and control structures;The same time it has a powerful and statbly core command set.And the key feature of Tcl is its extensibility. 

The interpreter was implemented by C, So in some way we can regards this is just a C Library, which is rich in order to expand the TCL C \ C + + process and function, It very easy to Embed TCL in you C/C++ Program, And each application can be according to their need for expansion of TCL language. We can target a specific application areas of the core language TCL command set to expand by adding suitable for their applications to expand the area of order, if necessary, can even add a new control structure, TCL interpreter will be extended and expanded control orders The inherent structure and command and control structure inherent in the same view. After the expansion of the TCL language will be able to inherit TCL The core of all of the features, including the core command and control structure, data types, such as the support of the process. According to need, we can even TCL out of shielding some inherent command and control structure inherent. Through the expansion of TCL, inheritance or shielding, usually defined as users do not need a computer language as the morphology, grammar, semantics, pragmatics, and other areas to be defined, can be convenient for their applications to provide a fully functional The scripting language.

TCL good scalability makes it well adapted to the needs of product testing, testing tasks often because of design changes and the needs of rapid change, often struggling to cope with the test. Use of TCL's scalability, rapid test can inherit a variety of new technologies, new products and features for the rapid expansion of TCL launch command sets, for use in product testing, we can more easily keep up with the design requirements change.

In addition, because the TCL is a ratio C \ C + + language has a higher level of abstract language, the use of TCL in a higher level programming, which suppress the preparation of C \ C + + procedures must be related to some of the more cumbersome The details, you can greatly enhance the speed of development of test cases. Moreover, TCL language used to write the script of the test cases, even if amended, and no need to re-build can call directly for the implementation of TCL explained. Can save a lot of time.

TCL has now become automatic test in the de facto standard in the CISCO IOS software also played a key to enhance the expansion of the role, and Tcl are still a lot of EDA tools in the order as an expansion.

Top

Background

Tcl/Tk 's Inventor John Ousterhout Professor in the early 1980s, is a professor at the University of Berkeley. In the course of his teaching, he discovered that the integrated circuit CAD design, a lot of time is spent on the establishment of test programming environment. And, once the environment has changed, it is necessary to revise the code to adapt. This laborious and inefficient way to force the Ousterhout. Professor trying to find a new programming language, it is a good code reusability, but also easy to learn, and this led to the formation of TCL language.The initial idea is to the programming in accordance with the component-based approach.That is, with its application for the preparation of a single line of code hundreds, not looking for one kind of method will be separated into a process of a certain small "complete" function, reusable components. These small components that can basically meet the needs of small, independent of the application requirements, from other parts of these small components function on the basis of formation. Different components have different functions for different purposes. And for other applications by using. Of course, this language would also like to have good expansion of its users to add new functional modules. Finally, the need for a strong and flexible "glue" to these components "stick" together the various components between each other "communications" and work together. Programming is like Puzzle Games, and this design was thinking coincides with the JAVA. Finally in 1988 the spring of this powerful and flexible glue language has been invented.

Top

Compare with other Scripts

Below on the classic Tcl and the programming language C++, Java and now fashionable to do some comparison:

  C++ Tcl/Tk Java
Speed Quickly Like C++ Slow
Debugging Complex Need Rebuild and Complie Simply Not need rebuild General Complie to ByteCode But complie speed is slow
Complex(grep) Compelx 50 Line Consice 10 Line 40 Line
System Resource 200MB HD
32MB Memory
3MB HD
4MB Memory
20MB HD
4MB Memory
maintainability and portability Good General Better

Top

Back