module std.os
std.os — process arguments, environment, exit (II.1).
Example:
use std.os { args, env, setenv }
fn main() io {
setenv("OXL_MODULE_EXAMPLE", "on")
print("{args().len() >= 1} {env("OXL_MODULE_EXAMPLE") ?? "unset"}")
}Output
true on
Functions
args | Command line: args()[0] is the program name, user arguments follow. |
env | Environment variable, none if unset (same as the prelude env). |
exit | Terminates the process with code (output is flushed). |
setenv | Sets an environment variable of this process (same as the prelude setenv). |