Posted to tcl by GPS at Sun Oct 14 03:50:32 GMT 2007view raw

  1. #include <tcl.h>
  2. #include <stdlib.h>
  3.  
  4. int main (int argc, char *argv[]) {
  5. Tcl_Interp *interp;
  6.  
  7. Tcl_FindExecutable (argv[0]);
  8.  
  9. while (1) {
  10. interp = Tcl_CreateInterp ();
  11. if (TCL_OK != Tcl_Init (interp)) abort();
  12. Tcl_Eval (interp, "proc foo {} {expr {1 + 2}}; foo");
  13. Tcl_DeleteInterp (interp);
  14. }
  15.  
  16. return EXIT_FAILURE;
  17. }
  18.