Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: a1fc5f5f9d67257a33f7c15b4ad8b294cd6fd55a
Ticket: 1230253fffffffffffffffffffffffffffffffff
match array
User & Date: msofer on 2005-07-02 20:36:49
Changes

  1. closedate changed to: "2005-07-02T13:36:49"
  2. closer changed to: "msofer"
  3. icomment:
    Logged In: YES 
    user_id=148712
    
    I still do not quite get it. I think you are proposing to
    have a builtin capability to do something like
    
    foreach {- key val} [regexp -all -inline $pattern $source] {
        set vector($key) $val
    }
    
    What should happen if the pattern does not always produce an
    even number of submatches? Would that be an error? What if
    the pattern is capable of producing an odd number of
    submatches, but doesn't with the particular input : error or
    not?
    
    As it is, I do not think the complication is really worth
    it. You can easily get this functionality in a proc. It is
    quite unlikely that the performance impact will be
    noticeable, if this is what is worrying you: proc calls and
    [set] are quite a bit faster than [regexp] in any case.
    
    
  4. login: "msofer"
  5. mimetype: "text/plain"
  6. resolution changed to: "Rejected"
  7. status changed to: "Pending"
  8. username: "msofer"