Posted to tcl by stu at Sat May 28 16:46:21 GMT 2022view raw

  1. Input:
  2.  
  3. {defe}proc proc{~}{/defe}
  4. {defe}/proc }{/defe}
  5. {defe}args {~}{{/defe}
  6. {defe}/args }{~}{{/defe}
  7.  
  8. {proc} test
  9. {args}a b args{/args}
  10. puts $a:$b:[llength $args]
  11. {/proc}
  12.  
  13.  
  14. Output:
  15.  
  16. proc test {a b args} { puts $a:$b:[llength $args] }
  17.