Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2000-10-26
08:28 • Closed ticket [218754ffff]: "info exists" doesn't see env variable... artifact: 99c54a1d89 user: welch
01:04 • New ticket [218754ffff]. artifact: ba3afa8bbe user: nobody

"info exists" doesn't see env variables

Closed / Fixed218754ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:04:58
OriginalBugID: 1999 Bug
Version: 8.1
SubmitDate: '1999-05-06'
LastModified: '2000-07-27'
Severity: MED
Status: Released
Submitter: pat
ChangedBy: ericm
OS: Solaris
OSVersion: 2.6
Machine: Other
FixedDate: '2000-07-27'
FixedInVersion: 8.2.2
ClosedDate: '2000-10-25'


Name:

Fred Roeber



CustomShell:

Nothing



ReproducibleScript:

In our C program that initializes TCL/TK we did:

      Tcl_PutEnv("TM_PATH=xxx")

    In our initial TCL script that we invoked from C we tried to do:

      if {[info exists env(TM_PATH)] == 1} {

    In TCL 8.1 this test always failed. In TCL 8.0.4 it worked as expected.

    For

    TCL 8.1 we had to instead use:

      if {[catch {set tp $env(TM_PATH)} err]} {

    This works. It would appear that there is a problem with the "info

    exists"

    command detecting certain variables.



ObservedBehavior:

As explained above, "info exists" didn't work as expected. It didn't

    detect

    variable.



DesiredBehavior:

As explained earlier, we expected "info exists" to work like it used to.





I am unable to duplicate this behavior in Tcl 8.2.2 or 8.3.1.  8.1.x is generally considered to be an unstable release now.  This bug was likely fixed between that version and the current versions.

I'm sorry it took so long to notify you.  If you are still having problems with this bug after upgrading, please let us know.  Thanks for reporting the problem.

   Eric Melski                            The Other Tcl Guy
   ericm at ajubasolutions.com            Ajuba Solutions

-- 07/27/2000 ericm
welch Closed ticket [218754ffff]. [History diff]2000-10-26 08:28:13
Log in (anonymous is fine) to add a comment.