Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

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

  1. comment changed to:
    Win7, mingw, Tcl 8.6 head;
    
    The call to:
    
    auto_mkindex d:/ mkindex-test.tcl
    
    fails if there is a if-else statement 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"
  4. title changed to:
    auto_mkindex fails on "if-else" statements outside any procedure