Tcl_CreateObjCommand函数 #include<tcl.h>// 定义命令处理函数intMyCommand(ClientData clientData,Tcl_Interp*interp,intobjc,Tcl_Obj*constobjv[]){// 在这里实现命令的逻辑Tcl_SetObjResult(interp,Tcl_NewStringObj("Hello, world!",-1));returnTCL_OK;}intmain(){Tcl_Interp*interp;// 创建Tcl解释器i...
Tcl_CreateObjCommand(interp, "my_command", myCmd, (ClientData) NULL, NULL); // ... if (inFile != NULL) Tcl_EvalFile(interp, inFile); // ... return TCL_OK; } 在main.cpp我有。。。 int Tcl_AppInit(Tcl_Interp *interp) { // ... interp = Tcl_CreateInterp(); if (interp ==...
Tcl_CreateObjCommand, Tcl_DeleteCommand, Tcl_DeleteCommandFromToken, Tcl_GetCommandInfo, Tcl_SetCommandInfo, Tcl_GetCommandName - implement new commands in C Tcl_Command()int()int()int()int()char *()defines a new command in and associates it with procedure such that whenever is invoked as a...