Posted to tcl by patthoyts at Wed Apr 19 11:21:45 GMT 2006view raw

  1. # see http://wiki.tcl.tk/1965
  2. proc lvarpop {var {ndx 0}} {
  3. upvar $var args
  4. set r [lindex $args $ndx]
  5. set args [lreplace $args $ndx $ndx]
  6. return $r
  7. }
  8.  
  9. # see http://wiki.tcl.tk/2028
  10. proc lvarpush {var val {ndx end}} {
  11. upvar $var args
  12. set args [linsert $args $ndx $val]
  13. }

Comments

Posted by LucMove at Wed Apr 19 11:35:31 GMT 2006 [text] [code]

Thanks for that

Posted by LucMove at Wed Apr 19 11:56:06 GMT 2006 [text] [code]

Thanks for that