name | Tcl |
---|---|
logo | |
paradigm | multi-paradigm: object-oriented, functional, procedural, event-driven programming, imperative |
released | 1988 |
designer | John Ousterhout |
developer | John Ousterhout, Tcl Core Team |
latest release version | 8.5.10 |
latest release date | |
typing | dynamic typing, everything can be treated as a string |
implementations | ActiveTcl |
influenced by | AWK, Lisp |
influenced | PowerShell, Tea |
website | www.tcl.tk |
file ext | .tcl }} |
The combination of Tcl and the Tk GUI toolkit is referred to as Tcl/Tk.
Date | Event |
January 1990 | Tcl announced beyond Berkeley (Winter USENIX). |
June 1990 | Expect announced (Summer USENIX). |
January 1991 | Tk (framework)>Tk (Winter USENIX). |
June 1993 | First Tcl/Tk conference (Berkeley). |
August 1997 | Tcl 8.0 introduced bytecode compiler. |
April 1999 | Tcl 8.1 introduces full Unicode support. |
August 2000 | Tcl Core Team formed, moving Tcl to a more community-oriented development model. |
September 2002 | Ninth Tcl/Tk conference (Vancouver). Announcement of starkit packaging system. Tcl 8.4.0 released. |
December 2007 | Tcl 8.5 added new datatypes, a new extension repository, bignums, lambdas. |
Tcl conferences and workshops are held in both the United States and Europe.
Tcl did not originally support object oriented (OO) syntax before 8.6 (8.6 provides an OO system in Tcl core), so OO functionality was provided by extension packages, such as incr Tcl and XOTcl. Even purely scripted OO packages exist, such as Snit and STOOOP (simple tcl-only object-oriented programming).
Safe-Tcl is a subset of TCL that has restricted features. File system access is limited and arbitrary system commands are prevented from execution. It uses a dual interpreter model with the "untrusted interpreter" running code in an untrusted script. It was designed by Nathaniel Borenstein and Marshall Rose to include active messages in e-mail. Safe-Tcl can be included in e-mail when the application/safe-tcl and multipart/enabled-mail are supported. The functionality of Safe-Tcl has since been incorporated as part of the standard Tcl/Tk releases.
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:
Variables and the results of other commands can be substituted inside strings too, such as in this example where we use set and expr to store a calculation result in a variable, and puts to print the result together with some explanatory text:
Formally, words are either written as-is, with double-quotes around them (allowing whitespace characters to be embedded), or with curly-brace characters around them, which suppresses all substitutions inside (except for backslash-newline elimination). In bare and double-quoted words, three types of substitution occur (once, in a single left-to-right scan through the word):
expr
command does.As a consequence of these rules, the result of any command may be used as an argument to any other command. Also, there is no operator or command for string concatenation, as the language concatenates directly. Note that, unlike in Unix command shells, Tcl does not reparse any string unless explicitly directed to do so, which makes interactive use more cumbersome but scripted use more predictable (e.g. the presence of spaces in filenames does not cause difficulties).
To summarize: there is one basic construct (the command) and a set of simple substitution rules. 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 expr
command or the first argument to if
. (Both of those commands are just part of the standard library; they have no particularly special place in the library and can be replaced if so desired.)
The majority of Tcl commands, especially in the standard library, are variadic, and the proc
(the constructor for scripted command procedures) supports the definition of both default values for arguments and a catch-all argument to allow the code to process arbitrary numbers of arguments.
Tcl is not statically typed: each variable may contain integers, floats, strings, lists, command names, dictionaries, or any other value; values are reinterpreted (subject to syntactic constraints) as other types on demand. However, values are immutable and operations that appear to change them actually just return a new value instead.
Digital logic simulators often include a Tcl scripting interface for simulating Verilog, VHDL and SystemVerilog hardware languages.
Tools exist (e.g. SWIG, ffidl) to automatically generate the necessary code to connect arbitrary C functions and the Tcl runtime, and Critcl does the reverse, allowing embedding of arbitrary C code inside a Tcl script and compiling it at runtime into a DLL.
Under Tcl 8.4, this package is known as Tile, while in Tcl 8.5 it has been folded into the core distribution of Tk (as Ttk).
Access to databases is also supported through database-specific extensions, of which there are many available.
Category:Scripting languages Category:Dynamically typed programming languages Category:Tcl programming language family Category:Text-oriented programming languages
ar:تي سي إل bg:Tcl ca:Tcl cs:Tcl de:Tcl et:Tcl es:Tcl eo:Tcl fr:Tool Command Language gl:TCL ko:Tcl is:Tcl it:Tcl he:TCL la:Tcl ms:Tcl nl:Tcl ja:Tcl/Tk no:Tcl pl:Tcl pt:Tcl ro:Tcl/TK ru:Tcl sr:Tcl fi:TCL sv:Tcl tg:Tcl tr:Tcl bug:Tcl uk:Tcl vi:Tcl zh:TclThis text is licensed under the Creative Commons CC-BY-SA License. This text was originally published on Wikipedia and was developed by the Wikipedia community.
The World News (WN) Network, has created this privacy statement in order to demonstrate our firm commitment to user privacy. The following discloses our information gathering and dissemination practices for wn.com, as well as e-mail newsletters.
We do not collect personally identifiable information about you, except when you provide it to us. For example, if you submit an inquiry to us or sign up for our newsletter, you may be asked to provide certain information such as your contact details (name, e-mail address, mailing address, etc.).
When you submit your personally identifiable information through wn.com, you are giving your consent to the collection, use and disclosure of your personal information as set forth in this Privacy Policy. If you would prefer that we not collect any personally identifiable information from you, please do not provide us with any such information. We will not sell or rent your personally identifiable information to third parties without your consent, except as otherwise disclosed in this Privacy Policy.
Except as otherwise disclosed in this Privacy Policy, we will use the information you provide us only for the purpose of responding to your inquiry or in connection with the service for which you provided such information. We may forward your contact information and inquiry to our affiliates and other divisions of our company that we feel can best address your inquiry or provide you with the requested service. We may also use the information you provide in aggregate form for internal business purposes, such as generating statistics and developing marketing plans. We may share or transfer such non-personally identifiable information with or to our affiliates, licensees, agents and partners.
We may retain other companies and individuals to perform functions on our behalf. Such third parties may be provided with access to personally identifiable information needed to perform their functions, but may not use such information for any other purpose.
In addition, we may disclose any information, including personally identifiable information, we deem necessary, in our sole discretion, to comply with any applicable law, regulation, legal proceeding or governmental request.
We do not want you to receive unwanted e-mail from us. We try to make it easy to opt-out of any service you have asked to receive. If you sign-up to our e-mail newsletters we do not sell, exchange or give your e-mail address to a third party.
E-mail addresses are collected via the wn.com web site. Users have to physically opt-in to receive the wn.com newsletter and a verification e-mail is sent. wn.com is clearly and conspicuously named at the point of
collection.If you no longer wish to receive our newsletter and promotional communications, you may opt-out of receiving them by following the instructions included in each newsletter or communication or by e-mailing us at michaelw(at)wn.com
The security of your personal information is important to us. We follow generally accepted industry standards to protect the personal information submitted to us, both during registration and once we receive it. No method of transmission over the Internet, or method of electronic storage, is 100 percent secure, however. Therefore, though we strive to use commercially acceptable means to protect your personal information, we cannot guarantee its absolute security.
If we decide to change our e-mail practices, we will post those changes to this privacy statement, the homepage, and other places we think appropriate so that you are aware of what information we collect, how we use it, and under what circumstances, if any, we disclose it.
If we make material changes to our e-mail practices, we will notify you here, by e-mail, and by means of a notice on our home page.
The advertising banners and other forms of advertising appearing on this Web site are sometimes delivered to you, on our behalf, by a third party. In the course of serving advertisements to this site, the third party may place or recognize a unique cookie on your browser. For more information on cookies, you can visit www.cookiecentral.com.
As we continue to develop our business, we might sell certain aspects of our entities or assets. In such transactions, user information, including personally identifiable information, generally is one of the transferred business assets, and by submitting your personal information on Wn.com you agree that your data may be transferred to such parties in these circumstances.