Project 3 TCL Question

I have been trying to learn a bit about TCL/TK GUI programming and found you example. I have a questions about the “connect” command on about the 4th line of the ssc-tester.tcl file.

At first I assumed that is referring to the “sys/socket.h” connect command, but when I manually open tclsh, load “”, and “connect” I get a print statement from connectProc.

I’m a bit of a newbie to tcl, does this mean that tcl calls to the c-library strip the term ‘Proc’ from a c-function name and apply some sort of default parameters? Where are those parameters defined?

Thanks in advance.


Hello Peter,
In ssctester.c there is a line that creates a Tcl function “connect” linked to the C function “connectProc”:

Tcl_CreateObjCommand(interp, "connect", &connectProc, NULL, NULL);

Take a look at the other C functions linked into Tcl and let me know if you understand what is going on. Sorry for the confusion!

Thanks Paul! That works great.