Skip to content
Tcl Source Code View Ticket
Login

View Ticket

info procs/body/args only return already auto_loaded procs

Open5c2f6c2ff45c07929b05a005cb741ace119cebbeCreated 6 years agoUpdated 6 years ago
Descriptionwiki2021-01-06 22:37:32
info procs/body/args only return already auto_loaded procs

Example, from a fresh tclsh session:

% info body tcl_endOfWord
"tcl_endOfWord" isn't a procedure
% tcl_endOfWord "foo bar" 2
3
% info body tcl_endOfWord

    variable ::tcl::WordBreakRE
    set result {-1 -1}
    regexp -indices -start $start -- $WordBreakRE(end) $str result
    return [lindex $result 1]

%

The first time [info body] is invoked, tcl_endOfWord has not yet been auto_loaded. The error output here is a bit surprising from a user point of view.

A documentation fix could perhaps be good enough.

Log in (anonymous is fine) to add a comment.