Navigation Logo Data Structures and Iteration Navigation Logo

 

 

Tcl has only two data types: strings and arrays of strings. This chapter discusses both and ways of iterating through them. It is possible to iterate through strings because they are viewed as lists of elements separated by white space.

Of course it is more traditional to view strings as sequences of characters rather than as lists. The traditional point of view is taken in Sections 5.4 and 6.1 as well as in all of Chapter 7.

As this is the first chapter in which some built-in action families are described, it seems a good place to describe switches and options. These are standardized ways of altering the behavior of actions.

  • Associative Arrays and the Concept of Function
  • Using Arrays for Missing Features
  • Procedures for Working with Arrays
  • The scan and format Procedures
  • Lists
  • An Action Family for Working with Lists
  • Lists Support Flexible Argument Usage
  • Switches and Options
  • Iteration
  • Indexing Web Sites
  • Solutions to Exercises
 

 

[Sample TK Application]
Author's Home Page
Navigation Logo [Book's Cover]
Order from Amazon.