Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 09d88a1a640ed0433b7e389358f87902554c0bbaebc6289ef3088d29582cb1c8
Ticket: bd45a0e32a1ce6cb1b4d0629e538da8fe94c1e65
lappend puts some args in braces if they start list
User & Date: sebres on 2018-08-13 17:12:31
Changes

  1. closedate changed to: "2458344.21702638"
  2. closer changed to: "sebres"
  3. icomment:
    It's not a bug, it's a feature.
    
    This way tcl allows to use canonical list as the command, for example compare:
    <code><pre style="padding-left: 10pt">
    % set l {{#0} #1 #2}
    {#0} #1 #2
    % if 1 $l
    invalid command name "#0"
    
    % set l {#0 #1 #2}
    #0 #1 #2
    % if 1 $l
    </pre></code>
    
    You see in the first case tcl invokes the command "#0"... 
    in second case it ignores the content of list because it is a comment in this case.
    
    In case of the list representation, it working as expected, so each element is the same:
    
    <code><pre style="padding-left: 10pt">
    % set new
    {#1234} #1234
    
    % lindex $new 0
    #1234
    % lindex $new 1
    #1234
    </pre></code>
    
    Thus closed as invalid.
    
  4. login: "sebres"
  5. mimetype: "text/x-fossil-wiki"
  6. resolution changed to: "Invalid"
  7. status changed to: "Closed"