Tcl Tutorial

  1. Getting Started

    1. Introduction
    2. Running Tcl
    3. Simple Text Output
    4. Assigning values to variables
    5. Evaluation & Substitutions 1: Grouping arguments with ""
    6. Evaluation & Substitutions 2: Grouping arguments with {}
    7. Evaluation & Substitutions 3: Grouping arguments with []
    8. Results of a command - Math 101
    9. Computers and Numbers
  2. Flow Control

    1. Numeric Comparisons 101 - if
    2. Textual Comparison - switch
    3. Looping 101 - While loop
    4. Looping 102 - For and incr
    5. Adding new commands to Tcl - proc
    6. Variations in proc arguments and return values
    7. Variable scope - global and upvar
  3. Data Types

    1. Tcl Data Structures 101 - The list
    2. Adding & Deleting members of a list
    3. More list commands - lsearch, lsort, lrange
    4. Simple pattern matching - "globbing"
    5. String Subcommands - length index range
    6. String comparisons - compare match first last wordend
    7. Modifying Strings - tolower, toupper, trim, format
    8. Regular Expressions 101
    9. More Examples Of Regular Expressions
    10. More Quoting Hell - Regular Expressions 102
    11. Associative Arrays
    12. More On Arrays - Iterating and use in procedures
    13. Dictionaries
  4. Input and Output

    1. File Access 101
    2. Information about Files - file, glob
    3. Invoking Subprocesses from Tcl - exec, open
  5. Introspection

    1. Learning the existence of commands and variables ? - info
    2. State of the interpreter - info
    3. Information about procs - info
  6. Modularization and Code Reuse

    1. Modularization - source
    2. Building reusable libraries - packages and namespaces
  7. Further Topics

    1. Creating Commands - eval
    2. More command construction - format, list
    3. Substitution without evaluation - format, subst
    4. Changing Working Directory - cd, pwd
    5. Debugging & Errors - errorInfo errorCode catch error return
    6. More Debugging - trace
    7. Command line arguments and environment strings
    8. Leftovers - time, unset
    9. Channel I/O: socket, fileevent, vwait
    10. Time and Date - clock
    11. More channel I/O - fblocked & fconfigure
    12. Child interpreters