An introduction to the Tcl programming language
Sponsored Project: The Jim interpreter
A small footprint implementation of Tcl
Send a comment to the author
Dear Reader, this book is an introduction to the main ideas of the Tcl programming language: If you wish to learn a simple and powerful programming language, this book is for you. To read this book, the only prior knowledge needed is some basic understanding of programming in any language: from C, to Python, Perl, Lisp, if you understand the meaning of function and variable and other basic concepts you should not experience problems continuing to read.
Why Tcl? Because it's a simple and general programming language, that can be used with success to develop applications in short time. Tcl is a programmable programming language, as you will discover later. There are few ideas inside, that it's possible to combine to create programs, and to extend the language in itself in order to attack programming problems in a very direct way.
Tcl was created by John Ousterhout around 1988 as an embeddable command language. Today Ousterhout is no longer actively developing the language, and the evolution of Tcl is in the hands of the Tcl Core Team, elected to direct the development of the Tcl Core in the summer of 2000, and the rest of the Tcl comunity. The Tcl Core Team is working towards the Tcl 8.5 version, that should be released in the fall of 2005.
Other Tcl/Tk books
2.1 Anatomy of a command
2.3 Program structure
2.4 Substitution of commands
2.5 Substitution of variables
2.6 More on interpolation
2.8 That's it
3.1 User defined procedures
3.2 The if command
4.1 Tcl list
4.2 The foreach command
4.3 The lrange command
4.4 The lappend command
4.5 The lset command
4.6 The lsort command
4.7 List values against variable names
5.1 The append command
5.2 The string command
5.3 string range
5.4 string index
5.5 string equal
5.6 string compare
5.7 string match
5.8 string map
5.9 string is
5.10 More string subcommands
5.11 Advanced string matching
6.1 Converting strings to lists
6.2 From strings to list of chars
6.3 Converting lists to strings
6.4 Manipulating strings as lists
7.1 Local variables
7.2 Top level
7.3 Global variables
7.4 Procedures arguments and pass by value
7.5 Procedures with a variable number of arguments
7.6 Procedures with default arguments
7.8 Recursion limit
8.1 The switch command
8.2 The for command
8.3 break and continue
8.4 The lack of goto
9.1 Programs executing programs: the eval command
9.2 Breaking the rules with uplevel
9.3 Passing variable names to procedures
9.4 Mapping scripts to lists
9.5 The rename command
9.6 Expanding lists into arguments in Tcl 8.5Additional 20 chapters in the printed version.
Copyright © 2004 Salvatore Sanfilippo. All rights reserved.
This online book is for personal use only.
It cannot be copied to other web sites or further distributed in any form.