Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ANNOUNCE: EC - embedded C in Tcl

8 views
Skip to first unread message

Grant Reaber

unread,
Jul 31, 1996, 3:00:00 AM7/31/96
to

--> EC
EC <--

--------------------------+-------------------------+--------------------------
Announcing version 0.1 of EC, which stands for Embedded C. EC lets you include
C code in your Tcl scripts, which will be compiled and dynamically loaded on
the fly. The compiled code will also be cached, so the next time you run the
program with embedded C, you won't have to wait for it to compile.
--------------------------+-------------------------+--------------------------

* EXAMPLES

Here are some examples to give you a feel.


Make a "getboolean" command like Tcl_GetBoolean:

> ec_command getboolean {b:val} {ec_bresult(val);}

Sum floating point numbers in C.

> ec_command sumd {d:args} {
> double sum = 0;
> for(; argc>0; argc--)
> sum += argv[argc-1];
> ec_dresult(sum);
> }

The syntax is very similar to proc's except that you have the option of adding
type specifiers like b and d (which stand for "boolean" and "double") which
ease the interface between C and Tcl.

* AVAILABILITY

Get EC from ftp.reed.edu:/pub/users/greaber/ec-0.1.tar.gz

EC is known to work on DEC OSF1-V3.2 and SunOS-5.5 (using gcc, bastards). It
will probably work on many other Unix systems. It doesn't yet work under Mac
or Windows. I'd like to get it ported. This is an alpha release. I'm looking
for people to try it out on different systems and give me feedback. I'm
especially interested in suggestions for making EC work "out of the box" on the
widest variety of systems possible.

* CONTACT

Grant Reaber
<gre...@reed.edu>


--
[[Send Tcl/Tk announcements to tcl-an...@mitchell.org
Send administrivia to tcl-announ...@mitchell.org
Announcements archived at http:/www.xpi.com/tcl/comp.lang.tcl.announce/
The primary Tcl/Tk archive is ftp://ftp.neosoft.com/pub/tcl/]]

0 new messages