2. Tcl Language Syntax
To write Tcl scripts, you must learn two things. First, you must learn the Tcl syntax, which consists of a dozen rules that determine how commands are parsed. The Tcl syntax is the same for every command. Second, you must learn about the individual commands that you use in your scripts. Tcl provides about 100 built-in commands, Tk adds several dozen more, and any application based on Tcl or Tk will add a few more of its own. You’ll need to know all of the syntax rules right away, but you can learn about the commands more gradually as you need them.
This chapter describes the Tcl language syntax. The remaining chapters in Part I describe the built-in Tcl commands, and Part II describes Tk’s commands.
2.1 Scripts, Commands, ...
Get Tcl and the Tk Toolkit, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.