Posted to tcl by jima at Tue Aug 27 10:44:04 GMT 2013view raw

  1. int TisFooCmd(clientData,interp,objc,objv) {
  2. /* do some */
  3. /* use clientData to store let's say number of arguments used */
  4. cData->numArgs = 5;
  5. return TCL_OK;
  6. }
  7.  
  8. int TisBarCmd(clientData,interp,objc,objv) {
  9. /* do some */
  10. /* use clientData to store let's say number of arguments used */
  11. cData->numArgs = 3;
  12. return TCL_OK;
  13. }
  14.  
  15. # Tcl level...
  16. tis foo x1 x2 x3 x4 x5 bar y1 y2 y3
  17.  
  18. # [tis] arranges a master clientData struct that is feed to the chain...
  19. # [tis] first does [foo x1 x2 x3 x4 x5 bar y1 y2 y3]
  20. # [tis] then reckons 5 are consumed
  21. # [tis] then does [bar y1 y2 y3]