title: how to pass variable arguments from one function to other in tcl
body: <p>I want to pass variable arguments obtained in one function to other function but I am not able to do so. Function gets even number of variable arguments and then it has to be converted in array. Below is the example. </p>
  
  <p>Procedure <code>abc1</code> gets two arguments (<code>k k</code>) and not form <code>abc1</code> procedure these have to be passed to proc <code>abc</code> where list to array conversion it to be done. List to array conversion works in proc1 i.e. <code>abc1</code> but not in second proc i.e. <code>abc</code> </p>
  
  <p>Error obtained is given below</p>
  
  <pre><code>proc abc {args} {
      puts "$args"
      array set arg $args
  }
  
  proc abc1 {args} {
      puts "$args"
      array set arg $args
      set l2 [array get arg]
      abc $l2
  }
  
  abc1 k k
  abc k k
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>k k
  {k k}
  list must have an even number of elements
      while executing
  "array set arg $l1"
      (procedure "abc" line 8)
      invoked from within
  "abc $l2"
      (procedure "abc1" line 5)
      invoked from within
  "abc1 k k"
      (file "vfunction.tcl" line 18)
  </code></pre>