Академический Документы
Профессиональный Документы
Культура Документы
3 days
70% Lecture/30% Lab
Basic Level
Overview
Tcl (Tool Command Language) is a remarkably simple scripting language that’s easy to
learn, yet powerful enough to implement large-scale, distributed applications. Whether you
need to build a complex graphical user interface, create a network-enabled application, or
develop a cross-platform program, Tcl can help you get the job done in less time than you
thought possible. Additionally, the language’s support for Internet access, database access,
and internationalization, as well as its stability and robustness, make it well-suited for
enterprise-wide applications.
The Tk extension to Tcl allows you to add a full-featured GUI to your application that will
have a platform-native appearance on Windows, Unix, and Macintosh. This Tcl extension
has proven so popular that it’s been ported as the standard GUI library for other scripting
languages such as Perl and Python.
Benefits
From this course you will learn
• Basic Tcl/Tk syntax and commands for writing Tcl/Tk scripts
• String processing, data structure manipulation, basic process interaction and file
handling
• How to make applications run faster
• How to create clean, maintainable code
• How to use basic Tk interface components and how to modify and extend their
behaviors and put them together into complex applications
• Some advanced features of Tcl/Tk
Note: Included in this course are optional advanced Tk modules covering topics including:
the text widget; the canvas widget; menus; and multi-window applications. Depending on
course pacing, student experience, and student needs, course delivery can be customized to
include these modules as needed.
Prerequisites
Students need to be familiar with the basics of programming and the use of a text editor.
Although Tcl/Tk can run on a number of operating systems, the course is normally taught in
a UNIX/Linux or Windows environment; student need to be familiar with basic file system
use (file system navigation; creating/opening files; etc.).
Training Approach
This is an intensive, interactive course, which is approximately 70% lecture and 30% lab.
Questions are highly encouraged. On the final day, students are given access to a zipped file
containing all of the solutions to the labs and the examples used throughout the course.
Course Outline
• Using “incr” for Integer Arithmetic
Day 1
Module 3 — Quoting and
Introduction to Tcl Programming, Substitution Rules
Part 1 • Quoting with Quotes Vs. Braces
• Nested Quoting Characters
Module 1 — Introduction to Tcl • Commands Substitution
• A Brief History of Tcl
• Tcl Resources Module 4 — Math
• The Tcl Interpreters—tclsh and wish • Arithmetic Operators and Functions
• Basic Tcl Syntax • Integer vs. Floating-Point Arithmetic
• Executing Tcl Commands Exercise 2
Interactively • Boolean Expressions
• Using “source” to Execute Tcl Scripts • String Comparisons
Tom Wille
tw@tm-associates.com
503-656-4457