|
Article on other languages:
|
For other uses, see Tcl (disambiguation).
Tcl (originally from "Tool Command Language", but nonetheless conventionally rendered as "Tcl" rather than "TCL"; pronounced as "tickle" or "tee-cee-ell"[2]) is a scripting language created by John Ousterhout. Originally "born out of frustration"[3]—according to the author—with programmers devising their own (poor quality) languages intended to be embedded into applications, Tcl quickly gained wide acceptance on its own and is generally thought to be easy to learn[4], but powerful in competent hands. It is most commonly used for rapid prototyping, scripted applications, GUIs and testing. Tcl is used extensively on embedded systems platforms, both in its full form and in several other small-footprinted versions. Tcl is also used for CGI scripting and as the scripting language for eggdrop bots. The combination of Tcl and the Tk GUI toolkit is referred to as Tcl/Tk.
HistoryThe Tcl programming language was created in the spring of 1988 by John Ousterhout while working at the University of California, Berkeley.
Tcl conferences and workshops are held in both the United States and Europe. FeaturesTcl's features include:
Tcl did not originally support object oriented syntax, being a functional language, but recent versions do support extensions which provide OO functionality, such as the XOTcl extension to Tcl. Other OO extensions also exist, such as incr Tcl, Snit, and STOOOP (simple tcl-only object-oriented programming). SyntaxA tcl script consists of several commands. A command is a list of words separated by whitespace. word0 word1 word2 ... wordN The first word is the name of a command, which is not built into the language, but which is in the library. The following words are arguments. So we have: commandName argument1 argument2 ... argumentN Practical example, using the puts command which outputs a string, adding a trailing newline, by default to the stdout channel: puts "Hello, world!" Any argument may be replaced by another command in square brackets. The subcommand is evaluated first and the result is substituted as the argument. Alternatively, any argument placed in curly braces will not be evaluated, but rather will be handed directly back to the original command as an argument. To summarize: there is one basic construct (the command) and a set of simple substitution rules, and only the square brackets, the curly braces, quotes, and the backslash have special meaning. The single equality sign (=) for example is not used at all, and the double equality sign (==) is the test for equality, and even then only in expression contexts such as the All commands have the same structure: a keyword which is followed by several parameters. A command is terminated by a newline or a semicolon. Even comments are just commands which happen to do nothing. Tcl is not statically typed: each variable may contain integers, floats, strings, lists or any other value. Interfacing with other languages
Tcl interfaces natively with the C language. C++ InteroperabilityJava InteroperabilityExtension packagesThe Tcl language has always supported extension packages, which provide additional functionality (such as a GUI, terminal-based application automation, database access, etc.) TkThe most popular Tcl extension is the Tk toolkit, which provides a graphical user interface library for a variety of operating systems. Each GUI consists of one or more frames. Each frame has a layout manager. Tile/TtkTile/Ttk is a styles and theming widget collection which can replace most of the widgets in Tk with variants which are truly platform native through calls to an operating system's API. Themes covered in this way are Windows XP, Windows Classic, Qt (which hooks into the X11 KDE environment libraries) and Aqua (Mac OS X). A theme can also be constructed without these calls using widget definitions supplemented with image pixmaps. Themes created this way include Classic Tk, Step, Alt/Revitalized, Plastik and Keramik. Under Tcl 8.4, this package is known as Tile, while in Tcl 8.5 it is included in the core distribution as Ttk. Itcl/IncrTclItcl is an object system for Tcl, and is normally named as [incr Tcl] (that being the way to increment in Tcl, similar in fashion to the name C++). TcllibTcllib is a set of scripted packages for Tcl that can be used with no compilation steps. DatabasesA number of database extensions are available:
and many, many others - see the Tcl/Tk Wiki, specifically the Tcl/Tk Wiki Database Category. See alsoWikibooks has a book on the topic of
References
Notes
External links
Main Tcl developer sites
Tcl distributions
tcl tutorials, books, etc.
Article keywords: tcl and the tk toolkit, tcl tutorial, tcl script, |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License.
Mercedes Car
This site monitored by SitePinger.net