Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7ff1a2babdd2df9481822cc7ab23ff7bfaa55281940bc9fa4bef86ef55e1cfb6
Ticket: e9a2715d912d86448a2ed18b2d25788cd50769b4
Tcl 8.6.11: Incompatible Tcl_GetRange()
User & Date: jan.nijtmans on 2022-01-17 22:37:57
Changes

  1. icomment:
    OK, a small experiment. Take version 8.6.10, and modify it a little but such that "string range" just calls Tcl_GetRange() without any modification: [756287e16e039f7d]
    <pre>
    ./tclsh
    % package require Tcl
    8.6.10
    % string range abc 0 5
    abcow        <--   indeed protection of 'last' doesn't work any more
    % string range abc 0 -1
    %            <--   empty string
    </pre>
    
    So, where do I see that '-1' is an official "end" shortcut?  I don't see that happening in Tcl 8.6.10. I which version did it work like you describe? Apparently not in Tcl 8.6.10!
    
  2. login: "jan.nijtmans"
  3. mimetype: "text/x-fossil-wiki"