Skip to content
Tcl Source Code History Of Ticket 7e9d561a08d14855
Login

History Of Ticket 7e9d561a08d14855

Artifacts Associated With Ticket 7e9d561a08d14855

  1. Ticket change [c62bbcafdb] (rid 207451) by anonymous on 2022-11-27 16:55:33:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-plain"
    4. comment initialized to:
      ########################################################
      # It may be error.
      ########################################################
      puts "$::tcl_patchLevel\n$::tcl_platform(os); $::tcl_platform(machine);\
       $::tcl_platform(platform); $::tcl_platform(osVersion); $::tcl_platform(wordSize);"
      set li { 1 2 3 4 5 }
      puts "[expr { [string map [list end [llength $li] ] end+8] } ]"
      ########################################################
      #Output:
      8.6.2
      Windows NT; intel; windows; 10.0; 4;
      5+8
      ########################################################
      # Why not 13?!
      ########################################################
      
    5. foundin initialized to: "8.6"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "011cf1866dfa8bb09f711926168b65e59e21409c"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "- New Builtin Commands"
    15. title initialized to: "It may be error."
    16. type initialized to: "Bug"
  2. Ticket change [72c88b24f4] (rid 207455) by jan.nijtmans on 2022-11-27 22:48:01:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2459911.45001476"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      Well, 8.6.2, that's an old Tcl version!!!!!
      
      I get:
      <pre>
      % set li { 1 2 3 4 5 }
       1 2 3 4 5 
      % expr { [string map [list end [llength $li] ] end+8] }
      5+8
      </pre>
      
      The reason for this is that your 'expr' has only a single argument (everything between the outer '[' and ']'. Therefore the '+' is not seen as an operation.
      
      Works as expected
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Invalid"
    8. status changed to: "Closed"