Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9021b40754a8c9198035895cac0e5c5e4f52ea71
Ticket: 218326ffffffffffffffffffffffffffffffffff
Quick mapping of a small list to variables
User & Date: nobody on 2000-10-26 00:56:15
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 3869 RFE
    Version: 8.0.3
    SubmitDate: '1999-12-13'
    LastModified: '1999-12-15'
    Severity: LOW
    Status: Closed
    Submitter: techsupp
    ChangedBy: hobbs
    OS: Linux-Red Hat
    OSVersion: RedHat 5.2 i386
    Machine: AMD K6-350 MHz
    FixedDate: '2000-10-25'
    ClosedDate: '1999-12-15'
    
    
    Name:
    Constantin Teodorescu
    
    Extensions:
    Tcl 8.0.3
    
    DesiredBehavior:
    It would be nice if we could assign the values from a small list to a list of variables:
    set mylist [list Teo 35 Braila Romania]
    lmap $mylist name age city country
    
    "lmap" (list map) will be the new command. I know that there is a "lassign" command in TclX but I would like to find it also in pure Tcl. For the moment I'm  using:
    
    foreach {name age city country} $mylist {}
    
    but it's less elegant.
    
    
    
    lassign can be made in pure Tcl, as noted on the newsgroup.
    We are considering a new ::listx metacommand for 8.3/4. 
    -- 12/15/1999 hobbs
    
  4. foundin changed to: "obsolete: 8.0.3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "Quick mapping of a small list to variables"
  11. type changed to: "RFE"