The Standard ML Basis Library


The CommandLine structure

The CommandLine structure provides access to the name and arguments used to invoke the currently running program. Additional information on the functions defined in this structure, particularly as stand-alone programs and program termination, can be found in Section 11.1.


Synopsis

signature COMMAND_LINE
structure CommandLine : COMMAND_LINE

Interface

val name : unit -> string
val arguments : unit -> string

Description

name ()
returns the name used to invoke the current program.

arguments ()
returns the argument list used to invoke the current program.
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.




Discussion

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.


[ INDEX | TOP | Parent | Root ]

Last Modified September 1, 1997
Comments to John Reppy.
Copyright © 1997 Bell Labs, Lucent Technologies