Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 87d2dfe67f2369b0242601c0d3bcf6ff6fba2b57
Ticket: 647307ffffffffffffffffffffffffffffffffff
Negative return codes misinterpreted
User & Date: nobody on 2002-12-02 23:02:53
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Tcl 8.4 procedure bodies seem to interpret the return 
    code -1 as if it was 4 (continue). This obstructs 
    [returneval] (see http://mini.net/tcl/4346).
    
    New bad behaviour:
    
      % info patchlevel
      8.4.1
      % parray tcl_platform
      tcl_platform(byteOrder) = bigEndian
      tcl_platform(machine)   = ppc
      tcl_platform(os)        = MacOS
      tcl_platform(osVersion) = 9.0
      tcl_platform(platform)  = macintosh
      % proc a {} {return -code -1 Special}
      % a
      command returned bad code: -1
      % proc b {} {a}
      % b
      invoked "continue" outside of a loop
    
    It should be "command returned bad code: -1" in both 
    cases. In 8.3.4 it was:
    
      % info patchlevel
      8.3.4
      % proc a {} {return -code -1 Special}
      % a
      command returned bad code: -1
      % proc b {} {a}
      % b
      command returned bad code: -1
    
    This could be related to bug 633204, but they could also 
    be unrelated.
    
    Lars Hellström
    
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "22. [proc] and [uplevel]"
  10. title changed to: "Nonstandard return codes misinterpreted"
  11. type changed to: "Bug"