executable-name

function

Library: Process execution (OMPROCESS)
Import : omprocess.xmd

Returns: An objet built from the executable name and the command-line arguments provided.


Declaration
export command-line-type function
   executable-name           value     string e-name
                   arguments read-only string arguments optional 
      

Argument definitions

e-name
is the name of the executable
arguments
is a string shelf, each item of which contains a single command-line argument to be passed to the executable when the process is launched.


Purpose

The executable-name function is used to create a representation of a command-line that can be used to launch a process using the execute function. Compared to the command-line function, the executable-name function allows the arguments to be parsed in a way best suited to the application, since arguments are provided as items on a shelf. The object returned by executable-name is opaque, and cannot be manipulated directly by an OmniMark program. executable-name is meant to be used directly as the argument to the function execute; examples of its use appear there.

The e-name argument is resolved to an actual executable program in a platform-dependent manner. On Unix platforms, the environment variable PATH is typically used to search for the executable.

The arguments shelf is passed to the executable as the collection of its command-line arguments. On Unix, these are passed as-is, one command-line argument per item value of the arguments shelf. On Windows, the value of the items of the arguments shelf are concatenated, separated by a space, and it is this resulting string which is passed as the command line. If any of the arguments may be blank, consider using the command-line function on Windows instead. In either case, the shelf item keys are not used.

Other Library Functions