The Standard ML Basis Library

The CommandLine structure


signature COMMAND_LINE
structure CommandLine :> COMMAND_LINE

The CommandLine structure provides access to the name and arguments used to invoke the currently running program.


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


val name : unit -> string
The name used to invoke the current program.

val arguments : unit -> string list
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 runtime system may consume some of them.


The precise semantics of the above operations are operating system and implementation-specific. For example, name might return a full pathname or just the base name. See also the comment under arguments.

[ Top | Parent | Contents | Index | Root ]

Generated April 12, 2004
Last Modified September 1, 1997
Comments to John Reppy.

This document may be distributed freely over the internet as long as the copyright notice and license terms below are prominently displayed within every machine-readable copy.

Copyright © 2004 AT&T and Lucent Technologies. All rights reserved.

Permission is granted for internet users to make one paper copy for their own personal use. Further hardcopy reproduction is strictly prohibited. Permission to distribute the HTML document electronically on any medium other than the internet must be requested from the copyright holders by contacting the editors. Printed versions of the SML Basis Manual are available from Cambridge University Press. To order, please visit (North America) or (outside North America).