std/env▲toc

Access to the program environment and commmand line arguments.

Print the environment: env.list.map(fun(p) { p.fst + "=" + p.snd }).join("\n").print

Note: we view the environment and command line as (total) constants in the program. i.e. as if the program is only compiled at the point when both the environment and command line is supplied.

val argv: vectorstd/core/vector: V -> V<stringstd/core/string: V>

The unprocessed command line that was used to start this program. On ''Node'' the first arguments will often be of the form ["node","interactive.js",...].

val env: dictstd/core/dict: V -> V<stringstd/core/string: V>

The environment variables for this program

fun getEnv( name : stringstd/core/string: V, default : ?stringstd/core/string: V ) : stringstd/core/string: V

Returns the value of an environment variable name. Returns default (= |"|) if the environment variable was not present.