4590141 [rkeene@sledge /home/rkeene/projects/rivet-cgi/rivet-tcl]$ cat -n lassign.tcl
   1: ###
   2: ## lassign <list> ?varName varName ...?
   3: ##
   4: ##    Assign a <list> of values to a list of variables.  This command emulates
   5: ##    the TclX lassign command.
   6: ###
   7: 
   8: proc lassign {list args} {
   9:     foreach elem $list varName $args {
  10: 	upvar 1 $varName var
  11: 	set var $elem
  12:     }
  13: }
4590142 [rkeene@sledge /home/rkeene/projects/rivet-cgi/rivet-tcl]$

Click here to go back to the directory listing.
Click here to download this file.
last modified: 2002-04-17 19:24:54