Environment Variable

Windows and POSIX systems support the use of 'EnvironmentVariables', which are essentially string->string associative arrays. While these generally serve purpose in identifying 'homes' for things and lookup paths for dynamic libraries and such, they also offer an alternative vector for process and script parameters. For example, a whole panoply of EnvironmentVariables form the parameters for CGI, and 'CFLAGS' is a well known environment variable parameter to gcc.

The primary advantages over 'explicit' parameters (e.g. command-line options) are:

The primary advantage of this form of parameter over registry settings and configuration files is: The disadvantage is that it is one more thing you need to get right before your processes will work.


A nice way to handle this is ExplicitManagementOfImplicitContext.

See also ThreadLocalVariable


EditText of this page (last edited March 27, 2011) or FindPage with title or text search