home *** CD-ROM | disk | FTP | other *** search
- # env - provides the system variable array env
-
- # The trace mechanism cannot cope with unsetting an env variable that has
- # not yet been read.
- # use "set env(x) {}" instead of "unset env(x)"
-
- set env(1) ""
- trace variable env rwu env_proc
-
- proc env_proc {name element op}\
- {
- if {$element!=""}\
- { set name ${name}($element)
- upvar $name x
- switch $op\
- { r { set x [getenv $element] ; return $x}
- w { system "set $element \"$x\""; return $x }
- u { system "unset $element" ; return }
- }
- }
- }
-
-
-
-
-