This section contains examples using the UNIXEnvironment class. Evaluate each of the expressions by highlighting them and selecting Display from the Edit menu.The UNIXEnvironment class retains a copy of the environment that was initially available. This is useful when the current environment has been changed and access to the original environment is required.In most situations, processes created from within Smalltalk use the current environment. The current environment can be accessed using the current method.If a custom environment is desired, a new UNIXEnvironment can be created and defined.The keys method answers all of the keys in an instance of UNIXEnvironment. This method is useful when checking a users configuration.If you are more familiar with the C language, you might want to use the getenv: message to access the current environment instead of querying the current environment and using the at: message. The messages getnev and at: are functionally equivalent for operations on the current environment.Using the putenv: message is similar to the getenv: message except it is used to set a value instead of query it. The messages putenv and at:put: are functionally equivalent for operations on the current environment.
|