Posted to tcl by jima at Tue Aug 27 10:44:04 GMT 2013view raw
- int TisFooCmd(clientData,interp,objc,objv) {
- /* do some */
- /* use clientData to store let's say number of arguments used */
- cData->numArgs = 5;
- return TCL_OK;
- }
- int TisBarCmd(clientData,interp,objc,objv) {
- /* do some */
- /* use clientData to store let's say number of arguments used */
- cData->numArgs = 3;
- return TCL_OK;
- }
- # Tcl level...
- tis foo x1 x2 x3 x4 x5 bar y1 y2 y3
- # [tis] arranges a master clientData struct that is feed to the chain...
- # [tis] first does [foo x1 x2 x3 x4 x5 bar y1 y2 y3]
- # [tis] then reckons 5 are consumed
- # [tis] then does [bar y1 y2 y3]