[[Property:title|Example: Environment variables]]
[[Property:weight|0]]
[[Property:uuid|60c39a34-0794-4c1f-a150-7431afa3e693]]
==Description==
Using features from the class EXECUTION_ENVIRONMENT
to create and retrieve an environment variable.
==Notes==
The make
procedure of the class APPLICATION
below uses the features put
and get
, inherited from the class EXECUTION_ENVIRONMENT
, to create the environment variable MY_VARIABLE
with value "Hello World!", and then to retrieve the value by key and print it.
==Solution==
class
APPLICATION
inherit
EXECUTION_ENVIRONMENT
create
make
feature {NONE} -- Initialization
make
-- Create and retrieve an environment variable.
do
put ("Hello World!", "MY_VARIABLE")
print (get ("MY_VARIABLE"))
end
end
==Output==
Hello World!