CommandLine
structureThe CommandLine structure provides access to the name and arguments used to invoke the currently running program.
signature COMMAND_LINE
structure CommandLine
: COMMAND_LINE
val name : unit -> string
val arguments : unit -> string
name ()
arguments ()
Implementation note:
The arguments returned may be only a subset of the arguments actually supplied by the user, since an implementation's run-time system may consume some of them.
The precise semantics of the above operations are OS- and implementation-specific. For example, name
might return the full pathname or just the base name. See also the implementation note under arguments
.
Implementations may provide a mechanism for taking a function and producing a stand-alone executable. If such a mechanism is provided, the type of the function being exported must be
(string * string list) -> OS.Process.statusWhen the stand-alone executable is invoked, the function is called with a first argument equal to
name ()
and a second argument equal to arguments ()
.
Last Modified January 21, 1997
Copyright © 1996 AT&T