The Standard ML Basis Library


The CommandLine structure


Synopsis

signature COMMAND_LINE
structure CommandLine :> COMMAND_LINE

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


Interface

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

Description

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.



Discussion

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 October 02, 2003
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 © 2003 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 www.cup.org (North America) or www.cup.cam.ac.uk (outside North America).