For the current version, see the link at top of this page.

The older 8.5 tutorial is at .

The "official" tutorial for Tcl, built upon TclTutor and designed to be included in the distribution. Other tutorials are listed at Online Tcl and Tk Tutorials.

Clif Flynt, Neil Madden, Arjen Markus, David Welton and others have contributed the information contained in the tutorial.

Since this tutorial is free software under the same generous license as Tcl itself, you are welcome to help improve it, translate it, publish it, or do whatever else you would like.

Comments and suggestions on the contents from both new and experience users are very welcome.

SYStems How can we comment? I suggest a comment sections beneath each lesson. It will act like slashdot story comments, sometimes you can learn more from the comments than from the story. Actually this way the lesson itself can be very basic, and all the gotchas can appear in the users comments.

Of course, just because there are plans to ship a tutorial with the Tcl core should not discourage anyone from writing their own tutorials. There are many ways to learn, and having many tutorials provides people with choices. As long as the information is correct, having choices is a good thing.

davidw You can comment just as you would with any other aspect of Tcl - via the tcl-core mailing list, or via the SF bug/request trackers. An on-line version with comments might be kind of neat, but I'm unlikely to spend time building that myself. I want something that can be shipped as-is with the core. So if there are things that need fixing/improving, let's do it.

The point in providing one official tutorial is not to quash others efforts, but to provide a focal point for tutorial work in order to raise the bar some. It would be preferable to have one good freely available tutorial that is maintained rather than lots of stuff like the IBM one that apparently isn't that great. Other tutorials will then have to differentiate themselves in some way - more focus on beginners, on experts... they will have to adapt and improve.

There are also times when choice is not good. Tutorials for most people are something where they'd like to find one that's good, rather than 10 mediocre ones that all purport to teach the same material. Were it up to me I'd prune the above list to eliminate some of the older links that don't really have anything new or different, and then I would categorize the other tutorials.

- davidw

LV While certainly having one good tutorial is better than having 10 mediocre - having 10 great tutorials is much better than having one good one. For those of you who would rather contribute to making the tutorial (that exists on the same web site as Tcl 8.5) better, please submit your suggestions for improvement. Having online docs for Tcl be the best possible is a great idea.

RLH - example code. That would be one of the better things to have in the docs that ship with 8.5. Sometimes as a newbie to Tcl I don't quite grok the syntax but an example clears that right up.

LV Example code is a great thing to have. Good example code - best practice quality - is even better. Don't show code that, if someone comes around using, the response would be but no one would code it that way.

DBP Also, I keep seeing reference to the "dozen rules"...but can't find a page that tells the dozen rules! A nice little page saying what the dozen syntax rules are, with illustrations of each, would be very helpful for a newcomer like me. Especially if you link it from the "dozen rules" sentence on the homepage...

RLH I think this gives the 12 rules of Tcl 8.5:

Lars H: Here on the wiki that dozen is often known under the fancier name "the dodekalogue".

AM (10 june 2005) Now that the Tcl tutorial is well on its way, I thought it a good moment to contemplate the Setup of a Tk tutorial

LV 2007-12-13 Turns out that this is not the case after all. Apparently there was differing expectations concerning the purpose of the tutorial. In any case, the above tutorial was not included in the Tcl 8.5.0 distribution.

LV Question: has anyone examined the tutorial to determine how much of the tcl scripting level language has been covered and how much remains to be covered?

NEM No. It's something I plan to do when I have more time, which should be after Christmas 2008.

LV another item of note - the above official tutorial is currently just for Tcl. If someone is looking for a useful contribution, writing similar tutorials for Tk, as well as other popular extensions, would be a wonderful thing to give back to the community.

Hopefully, you will be able to work with the others so that all the tutorials could end up in the same location, providing an evolving community electronic tcl book of sorts.

LV 2009-Aug-27 In a recent posting to comp.lang.tcl, NEM writes:

...project to update the Tcl tutorial into a book, somewhat along the lines you mention. It's available at and is being written as a free Creative Commons licensed resource for the community. Unfortunately, I'm just one rather busy person, so progress comes in dribs and drabs when I find time. Arjen Markus has also contributed the beginning Tk chapters, and some material has been adapted from the original Tcl tutorial (itself based on TclTutor).

RLH -- Is this still ongoing?

LV If you are talking about NEM's project, notice that his comment was made last week, so it seems likely it is still ongoing. If you are talking about the work on the tcltutorial files at, work on those is open to anyone who wants to submit feature request or bug report updates to the files.

NEM Yes, work on the new tutorial book is ongoing, if slow at times. The original tutorial is basically in maintenance mode: we update it in response to bug reports and requests, but not much active development.

LV 17 months after the above information, I am curious whether NEM and the others are continuing to work on the tutorial/book? I know that above there is a mention that people are busy. It is difficult to determine when the last updates occurred, and how much of Tcl/Tk 8.6 is present in the book.

NEM 2011-01-13: There hasn't been much activity recently. I'm planning to resume work on the book soon, but it will be at a different web address (as I no longer work at the university). I'll update here when it resumes. There is some coverage of 8.6 features, but I need to review what new additions have been made since I last updated.

LV I don't seem to be able to locate a current version of this work. the various URLs appear to be dead or dying.