Learn & Understand
TCL Programming
By Gaurav Kr. Roy
INTRODUCTION TO TCL
Chapter 2
The Tcl Family & Their Characteristics
 What is Tcl?
 Interpreted Language
 Tcl Shell (tclsh)
More about the Tcl Shell
 Invoked with no argument
 Invoked with argument
About the Tcl Commands
 The basic syntax for a Tcl command is:
command arg1 arg2 arg3 ...
 The command is either the name of a built-in command or a Tcl procedure.
White space (i.e., spaces or tabs) is used to separate the command name and its
arguments, and a newline (i.e., the end of line character) or semicolon is used to
terminate a command. Tcl does not interpret the arguments to the commands
except to perform grouping, which allows multiple words in one argument, and
substitution, which is used with programming variables and nested command
calls. The behavior of the Tcl command processor can be summarized in three
basic steps:
• Argument grouping.
• Value substitution of nested commands, variables, and backslash escapes.
• Command invocation. It is up to the command to interpret its arguments.
The Tcl Shell Interface
 How exactly You can open the Tcl shell for programming?
Hello Gaurav - Program
 % puts " Hello Gaurav “
 How it works?
Introduction to TCL Programming : Tcl/Tk by Gaurav Roy

Introduction to TCL Programming : Tcl/Tk by Gaurav Roy

  • 1.
    Learn & Understand TCLProgramming By Gaurav Kr. Roy
  • 2.
  • 3.
    The Tcl Family& Their Characteristics  What is Tcl?  Interpreted Language  Tcl Shell (tclsh)
  • 4.
    More about theTcl Shell  Invoked with no argument  Invoked with argument
  • 5.
    About the TclCommands  The basic syntax for a Tcl command is: command arg1 arg2 arg3 ...  The command is either the name of a built-in command or a Tcl procedure. White space (i.e., spaces or tabs) is used to separate the command name and its arguments, and a newline (i.e., the end of line character) or semicolon is used to terminate a command. Tcl does not interpret the arguments to the commands except to perform grouping, which allows multiple words in one argument, and substitution, which is used with programming variables and nested command calls. The behavior of the Tcl command processor can be summarized in three basic steps: • Argument grouping. • Value substitution of nested commands, variables, and backslash escapes. • Command invocation. It is up to the command to interpret its arguments.
  • 6.
    The Tcl ShellInterface  How exactly You can open the Tcl shell for programming?
  • 7.
    Hello Gaurav -Program  % puts " Hello Gaurav “  How it works?