#1852 info body fails if proc body was a list

obsolete: 8.3.4
closed-fixed
5
2002-04-18
2002-04-18
Anonymous
No

OS Platform: Windows 2000

Problem Behavior:
[info body] returns an empty string instead of the
body of a procedure that was defined as a list, and
not yet compiled. The proc still works, but
introspection is impossible.

Workaround: turn the body into a string, by appending
e.g. a space (see example below)

Expected behavior:
Return the string representation of the body in all
cases

Concise code sample: (interactive shell)
X:\home\suchenwi>tclsh
% proc test2 0 [list expr {$0 == "x"}]
% info body test2
% test2 x
1
% proc test3 0 "[list expr {$0 == "x"}] "
% info body test3
expr {$0 == "x"}

Discussion

    • status: open --> closed-fixed