ITWissen.info - Tech know how online

tool command language (Tcl)

Tool Command Language (Tcl) - pronounced "tickle" or te-ce-el - is a simple, yet very powerful, interpreted scripting language that is generally available as open source - in December 2009 in version 8.5.8. Tcl was developed as early as 1988 at the University of California, Berkeley by John Ousterhout, who later continued this work at SUN Microsystems. Tcl is particularly popular in connection with the extension Tk (Toolkit), which offers functions for the development of graphic user interfaces. A major advantage of Tcl is that it is both extensible and easy to integrate with other applications.

Tcl is very flexible and supports imperative, functional and object-oriented programming paradigms. The syntax of Tcl is built on the principle of "radically simple", and is influenced by C and Lisp programming languages, as well as by the Unix shell. Also, some aspects of the Bourne shell and Perl are unmistakable.

Applications for Tcl

Tool Command Language (Tcl) is a scripting language that can be used to write new applications and extend existing ones. For this purpose, it provides typical control structures such as variables, loops, procedures - i.e. constructs that are required by a large number of application programs. A special advantage is the possibility to integrate the language into almost any application and to extend its basic language elements with application-specific functions: the Tcl interpreter simply consists of a library of C functions which can be "linked" to programs and which, in addition to the actual implementation of the language, contains a number of functions with which the language scope of Tcl can be extended as desired.

Tk is a toolkit for platform-independent development of graphical user interfaces. Tk is on the one hand a library, on the other hand in the form of wish an application. Tk also consists of a library of C functions, the implementation of which again paid special attention to extensibility. This enables application developers to extend the functionality of Tk with new widgets (graphical objects) and so-called geometry managers (functions that control the arrangement and orientation of an application's widgets, i.e. its layout). With Tk, developers can create graphical user interfaces using Tcl scripts instead of C code.

Platforms for Tcl

Tcl/Tk are available for a variety of platforms - Windows, Linux, Mac OS X, Solaris, and many others. The Application Programming Interface( API) defined by Tk is also used by Perl, Python, and Ruby, among others. A Tcl script basically consists of one or more so-called commands. A command in turn consists of a command word followed by arguments or parameters. Among other things, Tcl provides powerful commands for processing strings - comparable to those of Python and Perl. Likewise, platform-independent commands are available for file editing, communication on the Internet, etc.

Example: The interpreter is called with tclsh or tclsh-versionsnr. Tcl is often pre-installed in Unix environments. If the graphical toolkit is to be included, require tk must be inserted in the script.

Example for Tcl

Example for Tcl

Incr Tcl. Incr Tcl provides a package of object-oriented extensions for Tcl and Tk (toolkit), which thus enable object-oriented programming with Tcl. Conceptually, the principle of inheritance is supported.

Tcl3D Extends Tcl by the possibilities of a 3D graphics programming. Among other things, it can be used to build viewers for .dxf files.

SnitThis extension also supports object-oriented programming with Tcl; however, it conceptually uses the principle of delegation.

Tile and Ttk Extend the originally Motif-oriented graphical functions of Tk with graphical user elements for a native look analogous to different operating systems.

XOTcl Also an extension with regard to object-oriented programming, which additionally supports meta classes.

The applications of Tcl are varied: as a powerful language for the command line, as an embedded language, as a Common Gateway Interface language in alternative to Perl, as a module in the ApacheWeb software in addition to PHP and as a language for procedures in connection with the database PostgreSQL.

With the Java Command Language( JACL) there is an integration of Tcl with the Java platform.

Informations:
Englisch: tool command language - Tcl
Updated at: 29.10.2013
#Words: 665
Links: connection, extension (EXTN), user, object (O), syntax
Translations: DE
Sharing:    

All rights reserved DATACOM Buchverlag GmbH © 2024