Tcl and the Tk Toolkit (häftad)
Fler böcker inom
Häftad (Paperback)
Antal sidor
Jones, Ken
229 x 175 x 43 mm
1224 g
Antal komponenter
Tcl and the Tk Toolkit (häftad)

Tcl and the Tk Toolkit

Häftad Engelska, 2009-09-18
Skickas inom 5-8 vardagar.
Fri frakt inom Sverige för privatpersoner.
John K. Ousterhouts Definitive Introduction to Tcl/TkNow Fully Updated for Tcl/Tk 8.5


Tcl and the Tk Toolkit, Second Edition, is the fastest way for newcomers to master Tcl/Tk and is the most authoritative resource for experienced programmers seeking to gain from Tcl/Tk 8.5s powerful enhancements. Written by Tcl/Tk creator John K. Ousterhout and top Tcl/Tk trainer Ken Jones, this updated volume provides the same extraordinary clarity and careful organization that made the first edition the worlds number one Tcl/Tk tutorial.


Part I introduces Tcl/Tk through simple scripts that demonstrate its value and offer a flavor of the Tcl/Tk scripting experience. The authors then present detailed, practical guidance on every feature necessary to build effective, efficient production applicationsincluding variables, expressions, strings, lists, dictionaries, control flow, procedures, namespaces, file and directory management, interprocess communication, error and exception handling, creating and using libraries, and more.


Part II turns to the Tk extension and Tk 8.5s new themed widgets, showing how to organize sophisticated user interface elements into modern GUI applications for Tcl.


Part III presents incomparable coverage of Tcls C functions, which are used to create new commands and packages and to integrate Tcl with existing C softwarethereby leveraging Tcls simplicity while accessing C libraries or executing performance-intensive tasks.


Throughout, the authors illuminate all of Tcl/Tk 8.5s newest, most powerful improvements. Youll learn how to use new Starkits and Starpacks to distribute run-time environments and applications through a single file; how to take full advantage of the new virtual file system support to treat entities such as zip archives and HTTP sites as mountable file systems; and more.


From basic syntax to simple Tcl commands, user interface development to C integration, this fully updated classic covers it all. Whether youre using Tcl/Tk to automate system/network administration, streamline testing, control hardware, or even build desktop or Web applications, this is the one Tcl/Tk book youll always turn to for answers.
Visa hela texten

Passar bra ihop

  1. Tcl and the Tk Toolkit
  2. +
  3. Practical Programming in Tcl and Tk

De som köpt den här boken har ofta också köpt Practical Programming in Tcl and Tk av Brent Welch, Ken Jones (mixed media product).

Köp båda 2 för 1308 kr


Har du läst boken? Sätt ditt betyg »

Fler böcker av författarna

Övrig information

John K. Ousterhout (Palo Alta, CA) is Professor (Research) of Computer Science at Stanford University and Chairman of Electric Cloud, Inc. He created the Tcl scripting language, and is also well known for his work in distributed operating systems, high-performance file systems, and user interfaces. He has served as Professor of Computer Science at UC Berkeley, Distinguished Engineer at Sun Microsystems, and founder/CEO of Scriptics. Ken Jones (San Francisco, CA), one of the world's leading Tcl/Tk experts, co-authored Practical Programming in TCL and TK, Fourth Edition (Prentice Hall PTR, 2003).


Preface xxv

Preface to the First Edition xxvii

Introduction xxxi


PART I: The Tcl Language 1


Chapter 1: An Overview of Tcl and Tk 3

1.1: Getting Started 3

1.2: Hello, World! with Tk 6

1.3: Script Files 8

1.4: Variables and Substitutions 11

1.5: Control Structures 12

1.6: On the Tcl Language 14

1.7: Event Bindings 15

1.8: Additional Features of Tcl and Tk 19


Chapter 2: Tcl Language Syntax 21

2.1: Scripts, Commands, and Words 21

2.2: Evaluating a Command 22

2.3: Variable Substitution 24

2.4: Command Substitution 26

2.5: Backslash Substitution 26

2.6: Quoting with Double Quotes 28

2.7: Quoting with Braces 29

2.8: Argument Expansion 30

2.9: Comments 32

2.10: Normal and Exceptional Returns 35

2.11: More on Substitutions 36


Chapter 3: Variables 39

3.1: Commands Presented in This Chapter 39

3.2: Simple Variables and the set Command 41

3.3: Tcls Internal Storage of Data 41

3.4: Arrays 42

3.5: Variable Substitution 43

3.6: Multidimensional Arrays 45

3.7: Querying the Elements of an Array 46

3.8: The incr and append Commands 47

3.9: Removing Variables: unset and array unset 49

3.10: Predefined Variables 49

3.11: Preview of Other Variable Facilities 50


Chapter 4: Expressions 53

4.1: Commands Presented in This Chapter 53

4.2: Numeric Operands 54

4.3: Operators and Precedence 55

4.4: Math Functions 58

4.5: Substitutions 60

4.6: String Manipulation 62

4.7: List Manipulation 63

4.8: Types and Conversions 63

4.9: Precision 64


Chapter 5: String Manipulation 65

5.1: Commands Presented in This Chapter 65

5.2: Extracting Characters: string index and string range 69

5.3: Length, Case Conversion, Trimming, and Repeating 70

5.4: Simple Searching 70

5.5: String Comparisons 71

5.6: String Replacements 72

5.7: Determining String Types 73

5.8: Generating Strings with format 74

5.9: Parsing Strings with scan 76

5.10: Glob-Style Pattern Matching 78

5.11: Pattern Matching with Regular Expressions 79

5.12: Using Regular Expressions for Substitutions 87

5.13: Character Set Issues 89

5.14: Message Catalogs 91

5.15: Binary Strings 95


Chapter 6: Lists 101

6.1: Commands Presented in This Chapter 101

6.2: Basic List Structure and the lindex and llength Commands 103

6.3: Creating Lists: list, concat, and lrepeat 105

6.4: Modifying Lists: lrange, linsert, lreplace, lset, and lappend 106

6.5: Extracting List Elements: lassign 109

6.6: Searching Lists: lsearch 110

6.7: Sorting Lists: lsort 111

6.8: Converting between Strings and List...