Bug 398549 - Bogus "Invalid argument" with [info $varCategory] where varCategory's value is from: {vars locals globals}
Summary: Bogus "Invalid argument" with [info $varCategory] where varCategory's value i...
Status: NEW
Alias: None
Product: DLTK
Classification: Technology
Component: Tcl (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: dltk.tcl-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-18 18:02 EST by Doug Hockin CLA
Modified: 2013-01-18 18:02 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Hockin CLA 2013-01-18 18:02:03 EST
foreach varCategory {vars locals globals} {

      foreach _var [info $varCategory] {

The second line generates this error:

Invalid argument:varCategory.
Possible values:args,body,cmdcount,commands,complete,default,exists,frame,functions,globals,hostname,level,library,loaded,locals,nameofexecutable,patchlevel,procs,script,sharedlibextension,tclversion,vars

Unless I prefix the 'info' with 'eval':

      foreach _var [eval info $varCategory] {

It runs without any errors either way.