TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Terry Westley <[log in to unmask]>
Reply To:
Terry Westley <[log in to unmask]>
Tue, 16 Nov 1999 09:54:03 -0500
text/plain (61 lines)
A new version of TASH which supports Tcl/Tk 8.2 and
the preliminary release of a new thick binding is
now available (and still free) at the new TASH website:

As part of this release, TASH was tested to work on
Red Hat Linux 5.2, Sun Solaris 2.5.1, Windows 95,
Windows 98, and Windows NT 4.0, compiling with GNAT 3.11p.

TASH now has a new thick binding whose purpose is to:

 - simplify and "Ada-fy" the capabilities of the Tcl
   scripting language,
 - make access to Tcl facilities task-safe, and
 - manage memory allocation of TASH (Tcl) objects.

Among other features, this binding makes it easy, in Ada,
to perform regular expression pattern matching and C-style

Here's an example of using regular expression pattern matching:

   if Tash.Regexp.Match (File_Name, "\.(a|ada|ads|adb)$") then
      Ada.Text_IO.Put_Line (File_Name & " is an Ada source file");
   end if;

Here's an example of using C-style printf in Ada:

   Ada.Text_IO.Put_Line (
      Tash.Lists.Format ("%s is %10.2f (%08x)",
         Tash.Lists.To_Tash_List (+"Half a pi", +1.5708, +82)));

First, we make a Tash list composed of three Tash objects,
a string, a float, and an integer.  Then, we call Format
to create and return a string with the formatted data
embedded per the format string.

This release of TASH does not include Windows binary
libraries.  These are built by GNAT with the Windows TASH
makefiles.  But, if you need them, I can build them and
make them available for download on the website.

The earlier thin binding is still part of TASH.
It comes in two parts:

 - one with C data types and integer return codes, and
 - the other with Ada data types and use of exceptions.

They both provide direct support for those data types
and functions available in tcl.h and tk.h.

Terry J. Westley, Software Systems Engineering Supervisor
Veridian Engineering, Calspan Operations
[log in to unmask]
Author of TASH, an Ada binding to Tcl/Tk.
Visit the TASH web site at