Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0424da1b7ad5d991193a121505d3a151da957a3b
Ticket: 0c86d397becdae7de0cf6e99fd24bc7527688f5a
auto_mkindex fails on "if-else" statements outside any procedure
User & Date: anonymous on 2013-08-06 09:49:08
Changes

  1. comment changed to:
    Win7, mingw, Tcl 8.6 head;
    
    The call to:
    
    auto_mkindex d:/ mkindex-test.tcl
    
    fails if there are if-statements outside any procedure or method.
    Reproduce: Create a file which content is only:
    
    if {$something == 1} {puts yes} else {puts no}
    
    results in an error:
    
    wrong # args: should be "if name body"
        invoked from within
    "if { something == 1} {puts yes} else {puts no}"
        invoked from within
    "$parser eval $contents"
        (procedure "auto_mkindex_parser::mkindex" line 27)
        invoked from within
    "auto_mkindex_parser::mkindex $file"
        (procedure "auto_mkindex" line 23)
        invoked from within
    "auto_mkindex d:/ mkindex-test.tcl"
    
    
    Note: When removing the "else" part then it works.
    
    thx
    
  2. login: "anonymous"
  3. mimetype: "text/plain"