Subject: Re: CCL:OOP in Comp. Chem. and other ideas

From: [email-masked] (Terry R. Coley)
Date: 15 Feb 1994 19:34:30 GMT

A number of people have asked for more information on Tcl, the
Tool Command Language created by Dr. John Ousterhout at Berkeley.
There are several sources of information:

  1)  newsgroup comp.lang.tcl
      Ask your system administrator how to read this newsgroup.

  2)  There is a FAQ (frequently asked questions) located at
      harbor.ecn.purdue.edu:/pub/tcl/docs, accessible via ftp.

  3)  harbor.ecn.purdue.edu also mirrors the full Tcl distribution
      and contains perhaps the most complete collect of extensions.

In brief, the Tcl language is a simple, easy to learn, yet powerful 
programming language.  There are two *critical* features of Tcl which
make it ideal for creating applications whose flow is controlled by
the Tcl language:

  * embeddability
  * extensibility

Embeddable means that you link the interpreter code into your program.
To interpret Tcl code, you call a function to evaluate a string
which is a sequence of Tcl commands.  Most often, this input string
comes from the command line or a script.

Extensible means that you can add verbs (called commands) to the language.  
There is a function call which will register a new command in the Tcl
interpreter.  The implementation of that command is performed by a 
C function you write.  Tcl takes care of parsing all the arguments to
your newly defined command when it is encountered in an input stream.
Your function is called with an argc,argv pair (argument count,
argument pointer vector) which you can use to in your function.  When
your function completes its computation, you return and the interpreter
continues to the next command.

  Terry R. Coley, Ph.D.                Erik P. Bierwagen
  Goddard Research Group, Caltech      Goddard Research Group, Caltech
  [email-masked]                [email-masked]