www.gibmonks.com

  Previous section   Next section

Practical Programming in Tcl & Tk, Third Edition
By Brent B. Welch

Table of Contents
Chapter 2.  Getting Started


The source Command

You can enter Tcl commands interactively at the % prompt. It is a good idea to try out the examples in this book as you read along. The highlighted examples from the book are on the CD-ROM in the exsource folder. You can edit these scripts in your favorite editor. Save your examples to a file and then execute them with the Tcl source command:

source filename

The source command reads Tcl commands from a file and evaluates them just as if you had typed them interactively.

Chapter 3 develops a sample application. To get started, just open an editor on a file named cgi1.tcl. Each time you update this file you can save it, reload it into Tcl with the source command, and test it again. Development goes quickly because you do not wait for things to compile!


      Previous section   Next section
    Top