Chapter 15. Hints and Tips for the Tcl Programmer

by Tom Poindexter

Tcl is simple compared with other computer languages. The Tcl(n) manual page, in just two pages, describes the syntax and semantics of the language with 11 concise rules. It’s useful to review this document.

Programmers familiar with other languages, especially shell languages and C, usually feel comfortable with Tcl quickly. Browsing programs written in Tcl helps new programmers understand the language. What may not be obvious in reviewing Tcl programs is the best way to get your programming tasks accomplished within the bounds of those 11 rules.

This chapter is designed to help new Tcl programmers better understand the Tcl language, especially when written code does not perform as expected or produces errors. Much of the material in this chapter was selected from postings to the Usenet newsgroup comp.lang.tcl. Beginning programmers often seek help with coding problems, and suggested answers are given. These postings, along with the author’s personal experiences, are presented here.

Note

Web addresses change over time. Use web search engines such as Yahoo!, AltaVista, Infoseek, and HotBot to help locate the Tcl FAQs if the links noted are out of date.

Other excellent sources of “how to” material available on the Web include these:

The Tcl Frequently Asked Questions (FAQ), by Larry Virden

This is an up-to-date, comprehensive list of frequently asked questions and answers—well worth reading. See http://www.teraform.com/˜lvirden/tcl-faq/.

Tcl Usage FAQ, by Joe Moss

This covers specific Tcl language usage questions and answers. See http://www.psg.com/˜joem/tcl/faq.html.

Tk Usage FAQ, by Jeffery Hobbs

This document compiles questions and answers specific to the Tk toolkit. See http://www.cs.uoregon.edu/research/tcl/faqs/tk/.

Tcl Reference Pages, by Cameron Laird

This is a collection of Tcl issues and explanations on a wide variety of topics. See http://starbase.neosoft.com/˜claird/comp.lang.tcl/tcl.html.

Tcl Frequently Made Mistakes

Cameron Laird has also compiled this list of frequent mistakes in Tcl. See http://starbase.neosoft.com/˜claird/comp.lang.tcl/fmm.html.

Tcl WWW Information Pages, by Mike Hopkirk

This is a comprehensive index to many Tcl resources, information, and source code. See http://www.sco.com/Technology/tcl/Tcl.html.

Scriptics Corporation Tcl Resource Center

This is the home of Tcl’s creator, John Ousterhout, and a focal point for Tcl development. Current and alpha/beta releases of new versions are available, as well as a comprehensive resource center. See http://www.scriptics.com.

The Tcl Consortium

This is the home page of a nonprofit consortium to promote Tcl and contains links to many Tcl resources. See http://www.tclconsortium.org.

Neosoft, Inc. Archive

This is a large archive of Tcl contributed software, including most extensions, applications, and utilities. See http://www.neosoft.com/tcl.

Usenet newsgroup comp.lang.tcl

Usenet has ongoing discussion forums about Tcl issues, announcements, and online support. The comp.lang.tcl newsgroup is unmoderated and friendly; everyone is welcome to participate. Depending on your news feed and location, you may have access to other Tcl newsgroups.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset