How to learn tcl language in less than an hour

From the beginning I liked tcl mainly because of:

a) Its simplicity and coherence, not bloated and easy to learn syntax.

b) The way it separately denote variable names and variable values that allows to construct strings in an intuitive way.

c) Its LISP taste, but not inflated with parenthesis.

d) its extension tk that allows to easily program GUIs.

Later:

e) Its simple interface to sqlite3 that makes it much more powerful.

How to learn it in record time? In perhaps less than one hour?

---

1. INSTALLING, CALLING THE INTERPRETER AND LEAVING IT

For installing tcl 9.0 and tk 9.0 give the commands:

# pkg install tcl90
# pkg install tk90

-

The interpreter for tcl is called then with:

# tclsh9.0

And the interpreter for tcl with tk for writing GUIs is called with:

# wish9.0

After calling them, you get a prompt % for tcl commands. The command to leave the interpreter is:

% exit

Or just give a ^D.

More about calling the interpreter:

man tclsh.tcl90
man wish.tk86 (if you installed also tk86, pkg does not install for 9.0)

---

2. LEARNING THE LANGUAGE

You can begin learning some few principles, for example with a short tutorial like:


or


That should be enough to read when necessary and understand the man pages in:

/usr/local/share/man/mann/

or


-

Then you will also be able to write GUIs with tk and help of the man pages, perhaps after reading an introduction like in the tk chapters linked here:


-

An exhaustive description of the Syntax is in:

man Tcl.tcl90


-

For the integration with sqlite3:


-

If you want to program Object Oriented, perhaps this introduction helps after you gained some experience with tcl:



3. HELP

From time to time you will need help from other people. You find it mainly in USENET group:

comp.lang.tcl

A lot of info is in:

 
I haven't played with Tcl for a long time, but I always liked it's design. I think perhaps it got a lot more traction in the US than it did in the UK. Also worthy of mention in Tcl-land is Expect... a very useful automation tool.
 
Back
Top