The Tcl Binding

16th October 2001

Tcl Binding Specification

The Java binding is maintained by Rob Sanderson <azaroth@liverpool.ac.uk>

Tcl is an easily-embeddable scripting language created by John Ousterhout. Its ZOOM binding is very briefly described at gondolin.hist.liv.ac.uk/~cheshire/zoom/tcl.html

Canonical Sample Program

To give a flavour of the Tcl binding, here is ZOOM's equivalent of the ``Hello World'' program: a tiny Z39.50 client that fetches and displays the MARC record for Farlow & Brett Surman's The Complete Dinosaur from the Library of Congress.

source zoom-1.2.tcl

object Connection conn "z3950.loc.gov" 7090
conn.setOption "database" "Voyager"
conn.setOption "preferredRecordSyntax" "MARC"

object Query query1 0 "7 0253333490"
set rs [conn.search [query1]]
set rec [$rs.getRecord 0]
puts [$rec.getRaw]

Tcl Binding Implementations

We currently have the following implementations of the Tcl binding:

Feedback to <mike@indexdata.com> is welcome!