Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: a64511817b042dcba54481f99cbde2f8087ead48
Ticket: 1671138fffffffffffffffffffffffffffffffff
foreach: empty var list -> inf loop
User & Date: dkf on 2007-03-01 16:23:10
Changes

  1. icomment:
    Logged In: YES 
    user_id=79902
    Originator: NO
    
    There is a way of detecting the difference without a loop:
      % proc foo {} {foreach {} x {error bar}}; foo
      bar
      % foreach {} x {error bar}
      foreach varlist is empty
    Proposed fix: detect the empty-var-list case and don't compile.
    
    
  2. login: "dkf"
  3. mimetype: "text/plain"
  4. username: "dkf"