| |
| |
List of Examples | |
| |
| |
List of Tables | |
| |
| |
Preface | |
| |
| |
| |
Tcl BASICS | |
| |
| |
| |
Tcl Fundamentals | |
| |
| |
Tcl Commands | |
| |
| |
Hello, World! Variables | |
| |
| |
Command Substitution | |
| |
| |
Math Expressions | |
| |
| |
Backslash Substitution | |
| |
| |
Grouping with Braces and Double Quotes | |
| |
| |
Procedures | |
| |
| |
A Factorial Example | |
| |
| |
More about Variables | |
| |
| |
More about Math Expressions | |
| |
| |
Comments | |
| |
| |
Substitution and Grouping Summary | |
| |
| |
Fine Points | |
| |
| |
Reference | |
| |
| |
| |
Getting Started | |
| |
| |
The source Command | |
| |
| |
UNIX Tcl Scripts | |
| |
| |
Windows Start Menu | |
| |
| |
Macintosh OS 8/9 and ResEdit | |
| |
| |
The console Command | |
| |
| |
Command-Line Arguments | |
| |
| |
Predefined Variables | |
| |
| |
| |
The Guestbook CGI Application | |
| |
| |
A Quick Introduction to HTML | |
| |
| |
CGI for Dynamic Pages | |
| |
| |
The guestbook.cgi Script | |
| |
| |
Defining Forms and Processing Form Data | |
| |
| |
Handling Errors in CGI Scripts | |
| |
| |
Next Steps | |
| |
| |
| |
String Processing in Tcl | |
| |
| |
The string Command | |
| |
| |
The append Command | |
| |
| |
The format Command | |
| |
| |
The scan Command | |
| |
| |
The binary Command | |
| |
| |
Related Chapters | |
| |
| |
| |
Tcl Lists | |
| |
| |
Tcl Lists | |
| |
| |
Constructing Lists | |
| |
| |
Getting List Elements: llength, lindex, and lrange | |
| |
| |
Modifying Lists: linsert and lreplace | |
| |
| |
Searching Lists: lsearch | |
| |
| |
Sorting Lists: lsort | |
| |
| |
The split Command | |
| |
| |
The join Command | |
| |
| |
Related Chapters | |
| |
| |
| |
Control Structure Commands | |
| |
| |
If Then Else | |
| |
| |
Switch | |
| |
| |
While | |
| |
| |
Foreach | |
| |
| |
For | |
| |
| |
Break and Continue | |
| |
| |
Catch | |
| |
| |
Error | |
| |
| |
Return | |
| |
| |
| |
Procedures and Scope | |
| |
| |
The proc Command | |
| |
| |
Changing Command Names with rename | |
| |
| |
Scope | |
| |
| |
The global Command | |
| |
| |
Call by Name Using upvar | |
| |
| |
Variable Aliases with upvar | |
| |
| |
| |
Tcl Arrays | |
| |
| |
Array Syntax | |
| |
| |
The array Command | |
| |
| |
Building Data Structures with Arrays | |
| |
| |
| |
Working with Files and Programs | |
| |
| |
Running Programs with exec | |
| |
| |
The file Command | |
| |
| |
Cross-Platform File Naming | |
| |
| |
Manipulating Files and Directories | |
| |
| |
File Attributes | |
| |
| |
Input/Output Command Summary | |
| |
| |
Opening Files for I/O | |
| |
| |
Reading and Writing | |
| |
| |
The Current Directory cd and pwd | |
| |
| |
Matching File Names with glob | |
| |
| |
The exit and pid Commands | |
| |
| |
Environment Variables | |
| |
| |
The registry Command | |
| |
| |
| |
Advanced Tcl | |
| |
| |
| |
Quoting Issues and Eval | |
| |
| |
Constructing Code with the list Command | |
| |
| |
Exploiting the concat inside eval | |
| |
| |
The uplevel Command | |
| |
| |
The subst Command | |
| |
| |
| |
Regular Expressions | |
| |
| |
When to Use Regular Expressions | |
| |
| |
Regular Expression Syntax | |
| |
| |
Advanced Regular Expressions | |
| |
| |
Syntax Summary | |
| |
| |
The regexp Command | |
| |
| |
The regsub Command | |
| |
| |
Transforming Data to Program with regsub | |
| |
| |
Other Commands That Use Regular Expressions | |
| |
| |
| |
Script Libraries and Packages | |
| |
| |
Locating Packages: The auto_path Variable | |
| |
| |
Using Packages | |
| |
| |
Summary of Package Loading | |
| |
| |
The package Command | |
| |
| |
Libraries Based on the tclIndex File | |
| |
| |
The unknown Command | |
| |
| |
Interactive Conveniences | |
| |
| |
Tcl Shell Library Environment | |
| |
| |
Coding Style | |
| |
| |
| |
Reflection and Debugging | |
| |
| |
The clock Command | |
| |
| |
The info Command | |
| |
| |
Cross-Platform Support | |
| |
| |
Tracing Variables and Commands | |
| |
| |
Interactive Command History | |
| |
| |
Debugging | |
| |
| |
Tcl Dev Kit | |
| |
| |
Other Tools | |
| |
| |
Performance Tuning | |
| |
| |
| |
Namespaces | |
| |
| |
Using Namespaces | |
| |
| |
Namespace Variables | |
| |
| |
Command Lookup | |
| |
| |
Nested Namespaces | |
| |
| |
Importing and Exporting Procedures | |
| |
| |
Callbacks and Namespaces | |
| |
| |
Introspection | |
| |
| |
The namespace Command | |
| |
| |
Converting Existing Packages to use Namespaces | |
| |
| |
[incr Tcl] Object System | |
| |
| |
xotcl Object System | |
| |
| |
Notes | |
| |
| |
| |
Internationalization | |
| |
| |
Character Sets and Encodings | |
| |
| |
Message Catalogs | |
| |
| |
| |
Event-Driven Programming | |
| |
| |
The Tcl Event Loop | |
| |
| |
The after Command | |
| |
| |
The fileevent Command | |
| |
| |
The vwait Command | |
| |
| |
The fconfigure Command | |
| |
| |
| |
Socket Programming | |
| |
| |
Networking Extensions for Tcl | |
| |
| |
Client Sockets | |
| |
| |
Server Sockets | |
| |
| |
The Echo Service | |
| |
| |
Fetching a URL with HTTP | |
| |
| |
The http Package | |
| |
| |
Basic Authentication | |
| |
| |
| |
TclHttpd Web Server | |
| |
| |
Int | |