Windows env-Bug?



Hi TCLers

I've found a strange behaviour in Windows which I would call a bug:
-----------------------------------------
% set env(Test) "Value"
Value
% info exists env(Test)
1
% puts $env(Test)
Value
% set env(Test) ""
% info exists env(Test)
1
% puts $env(Test)
can't read "env(Test)": no such variable
-----------------------------------------

[info exists ..] returns 1 but the variable cannot be dereferenced.

% puts $tcl_patchLevel
8.4.13
% parray tcl_platform
tcl_platform(byteOrder) = littleEndian
tcl_platform(machine) = intel
tcl_platform(os) = Windows NT
tcl_platform(osVersion) = 5.0
tcl_platform(platform) = windows

Same on Windows XP (Windows NT 5.1) with TCL 8.4.11,
no problem on Linux and Unix (AIX), "" is returned.

Has anyone else seen this behaviour before?

Does one have a good idea as workaround?

Controlling the environment is essential to a project where I'm working
on.

--
Gerhard Reithofer
Tech-EDV Support Forum - http://support.tech-edv.co.at
.



Relevant Pages

  • Re: Extracting my ID
    ... Now, if I put these 3 commands into a tcl shell, then the puts outputs ... twapi is an extension for Tcl which wraps large parts of the windows ...
    (comp.lang.tcl)
  • Re: Non-Threaded Timeout?
    ... puts "Hello" ... popen blocks ALL ruby threads on windows. ...
    (comp.lang.ruby)
  • Re: puts in threads on windows not working
    ... to become puts "strings" -opts in the main thread. ... I use a simple puts to stdout to debug threads on windows with no ... Interesting, the above example, from the welsh book, does work ... I wanted to see if some things that away from the gui ...
    (comp.lang.tcl)
  • Re: File.exist? behavior problem/question
    ... I am new to Ruby and am seeing this behavior in windows (one-click ... behavior in linux - it seems to be specific to the windows installs I ... puts 'Checking for file: ' + fileToTest ...
    (comp.lang.ruby)
  • Re: [OT] sh command that ascends dir tree for executable
    ... def find_program_hierarchically ... # Remove drive letter for Windows paths. ... puts find_program_hierarchically ...
    (comp.lang.ruby)