Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 74598acdd584c7cf46cc45ecbf839738c25b9967f8041d09897b1d6846891a7b
Ticket: 141c6f5621e9c9e881f63fbf28c473955b6adae0
[string length] reports a length of 2 for a single character
User & Date: dgp on 2022-03-07 15:33:41
Changes

  1. closedate changed to: "2459646.14839932"
  2. icomment:
    
    Another programming inference that might commonly be in use:
    
      [llength [split $s {}]] == [string length $s]
    
    We could use a list of such "Gotchas!" to call attention to
    in a migration guide to Tcl 8.7.  These loops no longer reliably
    implement the same function in Tcl 8.7:
    
    foreach c [split $s {}] {process $c}
    
    for {set i 0} {$i < [string length $s]} {incr i} {process [string index $s $i]}
    
    Here again, the expectations of functional equivalence are restored in Tcl 9.
    
  3. login: "dgp"
  4. mimetype: "text/plain"